<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chapter 2 Installing and Upgrading MySQL</title>
<link rel="stylesheet" href="mvl.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets + chunker.py v1.9.2" />
<link rel="start" href="index.html" title="{book-title}" />
<link rel="up" href="" title="" />
<link rel="prev" href="introduction.html" title="Chapter 1 General Information" />
<link rel="next" href="tutorial.html" title="Chapter 3 Tutorial" />
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 2 Installing and Upgrading MySQL</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="introduction.html">Prev</a> </td>
<th width="60%" align="center"></th>
<td width="20%" align="right"> <a accesskey="n" href="tutorial.html">Next</a></td>
</tr>
</table>
<hr>
</div>
<div class="chapter">
<div class="titlepage">
<div>
<div>
<h1 class="title"><a name="installing"></a>Chapter 2 Installing and Upgrading MySQL</h1>

</div>

</div>

</div>
<div class="toc">
<p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="installing.html#general-installation-issues">2.1 General Installation Guidance</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#which-version">2.1.1 Which MySQL Version and Distribution to Install</a></span></dt><dt><span class="section"><a href="installing.html#getting-mysql">2.1.2 How to Get MySQL</a></span></dt><dt><span class="section"><a href="installing.html#verifying-package-integrity">2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG</a></span></dt><dt><span class="section"><a href="installing.html#installation-layouts">2.1.4 Installation Layouts</a></span></dt><dt><span class="section"><a href="installing.html#compiler-characteristics">2.1.5 Compiler-Specific Build Characteristics</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#binary-installation">2.2 Installing MySQL on Unix/Linux Using Generic Binaries</a></span></dt><dt><span class="section"><a href="installing.html#windows-installation">2.3 Installing MySQL on Microsoft Windows</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#windows-installation-layout">2.3.1 MySQL Installation Layout on Microsoft Windows</a></span></dt><dt><span class="section"><a href="installing.html#windows-choosing-package">2.3.2 Choosing an Installation Package</a></span></dt><dt><span class="section"><a href="installing.html#mysql-installer">2.3.3 MySQL Installer for Windows</a></span></dt><dt><span class="section"><a href="installing.html#windows-install-archive">2.3.4 Installing MySQL on Microsoft Windows Using a
<code class="literal">noinstall</code> ZIP Archive</a></span></dt><dt><span class="section"><a href="installing.html#windows-troubleshooting">2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation</a></span></dt><dt><span class="section"><a href="installing.html#windows-postinstallation">2.3.6 Windows Postinstallation Procedures</a></span></dt><dt><span class="section"><a href="installing.html#windows-restrictions">2.3.7 Windows Platform Restrictions</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#osx-installation">2.4 Installing MySQL on macOS</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#osx-installation-notes">2.4.1 General Notes on Installing MySQL on macOS</a></span></dt><dt><span class="section"><a href="installing.html#osx-installation-pkg">2.4.2 Installing MySQL on macOS Using Native Packages</a></span></dt><dt><span class="section"><a href="installing.html#osx-installation-launchd">2.4.3 Installing and Using the MySQL Launch Daemon</a></span></dt><dt><span class="section"><a href="installing.html#osx-installation-prefpane">2.4.4 Installing and Using the MySQL Preference Pane</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#linux-installation">2.5 Installing MySQL on Linux</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#linux-installation-yum-repo">2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-apt-repo">2.5.2 Installing MySQL on Linux Using the MySQL APT Repository</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-sles-repo">2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-rpm">2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-debian">2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-docker">2.5.6 Deploying MySQL on Linux with Docker</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-native">2.5.7 Installing MySQL on Linux from the Native Software Repositories</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-juju">2.5.8 Installing MySQL on Linux with Juju</a></span></dt><dt><span class="section"><a href="installing.html#using-systemd">2.5.9 Managing MySQL Server with systemd</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#uln-installation">2.6 Installing MySQL Using Unbreakable Linux Network (ULN)</a></span></dt><dt><span class="section"><a href="installing.html#solaris-installation">2.7 Installing MySQL on Solaris</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#solaris-installation-pkg">2.7.1 Installing MySQL on Solaris Using a Solaris PKG</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#freebsd-installation">2.8 Installing MySQL on FreeBSD</a></span></dt><dt><span class="section"><a href="installing.html#source-installation">2.9 Installing MySQL from Source</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#source-installation-methods">2.9.1 Source Installation Methods</a></span></dt><dt><span class="section"><a href="installing.html#source-installation-prerequisites">2.9.2 Source Installation Prerequisites</a></span></dt><dt><span class="section"><a href="installing.html#source-installation-layout">2.9.3 MySQL Layout for Source Installation</a></span></dt><dt><span class="section"><a href="installing.html#installing-source-distribution">2.9.4 Installing MySQL Using a Standard Source Distribution</a></span></dt><dt><span class="section"><a href="installing.html#installing-development-tree">2.9.5 Installing MySQL Using a Development Source Tree</a></span></dt><dt><span class="section"><a href="installing.html#source-ssl-library-configuration">2.9.6 Configuring SSL Library Support</a></span></dt><dt><span class="section"><a href="installing.html#source-configuration-options">2.9.7 MySQL Source-Configuration Options</a></span></dt><dt><span class="section"><a href="installing.html#compilation-problems">2.9.8 Dealing with Problems Compiling MySQL</a></span></dt><dt><span class="section"><a href="installing.html#source-configuration-third-party">2.9.9 MySQL Configuration and Third-Party Tools</a></span></dt><dt><span class="section"><a href="installing.html#source-installation-doxygen">2.9.10 Generating MySQL Doxygen Documentation Content</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#postinstallation">2.10 Postinstallation Setup and Testing</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#data-directory-initialization">2.10.1 Initializing the Data Directory</a></span></dt><dt><span class="section"><a href="installing.html#starting-server">2.10.2 Starting the Server</a></span></dt><dt><span class="section"><a href="installing.html#testing-server">2.10.3 Testing the Server</a></span></dt><dt><span class="section"><a href="installing.html#default-privileges">2.10.4 Securing the Initial MySQL Account</a></span></dt><dt><span class="section"><a href="installing.html#automatic-start">2.10.5 Starting and Stopping MySQL Automatically</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#upgrading">2.11 Upgrading MySQL</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#upgrade-before-you-begin">2.11.1 Before You Begin</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-paths">2.11.2 Upgrade Paths</a></span></dt><dt><span class="section"><a href="installing.html#upgrading-what-is-upgraded">2.11.3 What the MySQL Upgrade Process Upgrades</a></span></dt><dt><span class="section"><a href="installing.html#upgrading-from-previous-series">2.11.4 Changes in MySQL 8.0</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-prerequisites">2.11.5 Preparing Your Installation for Upgrade</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-binary-package">2.11.6 Upgrading MySQL Binary or Package-based Installations on Unix/Linux</a></span></dt><dt><span class="section"><a href="installing.html#updating-yum-repo">2.11.7 Upgrading MySQL with the MySQL Yum Repository</a></span></dt><dt><span class="section"><a href="installing.html#updating-apt-repo">2.11.8 Upgrading MySQL with the MySQL APT Repository</a></span></dt><dt><span class="section"><a href="installing.html#updating-sles-repo">2.11.9 Upgrading MySQL with the MySQL SLES Repository</a></span></dt><dt><span class="section"><a href="installing.html#windows-upgrading">2.11.10 Upgrading MySQL on Windows</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-docker-mysql">2.11.11 Upgrading a Docker Installation of MySQL</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-troubleshooting">2.11.12 Upgrade Troubleshooting</a></span></dt><dt><span class="section"><a href="installing.html#rebuilding-tables">2.11.13 Rebuilding or Repairing Tables or Indexes</a></span></dt><dt><span class="section"><a href="installing.html#copying-databases">2.11.14 Copying MySQL Databases to Another Machine</a></span></dt></dl></dd><dt><span class="section"><a href="installing.html#downgrading">2.12 Downgrading MySQL</a></span></dt><dt><span class="section"><a href="installing.html#perl-support">2.13 Perl Installation Notes</a></span></dt><dd><dl><dt><span class="section"><a href="installing.html#perl-installation">2.13.1 Installing Perl on Unix</a></span></dt><dt><span class="section"><a href="installing.html#activestate-perl">2.13.2 Installing ActiveState Perl on Windows</a></span></dt><dt><span class="section"><a href="installing.html#perl-support-problems">2.13.3 Problems Using the Perl DBI/DBD Interface</a></span></dt></dl></dd></dl>
</div>
<a class="indexterm" name="idm46444444146848"></a><p>
    This chapter describes how to obtain and install MySQL. A summary of
    the procedure follows and later sections provide the details. If you
    plan to upgrade an existing version of MySQL to a newer version
    rather than install MySQL for the first time, see
    <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a>, for information about upgrade
    procedures and about issues that you should consider before
    upgrading.
  </p><p>
    If you are interested in migrating to MySQL from another database
    system, see <a class="xref" href="faqs.html#faqs-migration" title="A.8 MySQL 8.0 FAQ: Migration">Section A.8, “MySQL 8.0 FAQ: Migration”</a>, which contains answers
    to some common questions concerning migration issues.
  </p><p>
    Installation of MySQL generally follows the steps outlined here:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
        <span class="bold"><strong>Determine whether MySQL runs and is
        supported on your platform.</strong></span>
      </p><p>
        Please note that not all platforms are equally suitable for
        running MySQL, and that not all platforms on which MySQL is
        known to run are officially supported by Oracle Corporation. For
        information about those platforms that are officially supported,
        see <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_top">https://www.mysql.com/support/supportedplatforms/database.html</a> on the MySQL
        website.
      </p></li><li class="listitem"><p>
        <span class="bold"><strong>Choose which distribution to
        install.</strong></span>
      </p><p>
        Several versions of MySQL are available, and most are available
        in several distribution formats. You can choose from
        pre-packaged distributions containing binary (precompiled)
        programs or source code. When in doubt, use a binary
        distribution. Oracle also provides access to the MySQL source
        code for those who want to see recent developments and test new
        code. To determine which version and type of distribution you
        should use, see <a class="xref" href="installing.html#which-version" title="2.1.1 Which MySQL Version and Distribution to Install">Section 2.1.1, “Which MySQL Version and Distribution to Install”</a>.
      </p></li><li class="listitem"><p>
        <span class="bold"><strong>Download the distribution that you want to
        install.</strong></span>
      </p><p>
        For instructions, see <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>. To verify
        the integrity of the distribution, use the instructions in
        <a class="xref" href="installing.html#verifying-package-integrity" title="2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG">Section 2.1.3, “Verifying Package Integrity Using MD5 Checksums or GnuPG”</a>.
      </p></li><li class="listitem"><p>
        <span class="bold"><strong>Install the distribution.</strong></span>
      </p><p>
        To install MySQL from a binary distribution, use the
        instructions in <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>.
      </p><p>
        To install MySQL from a source distribution or from the current
        development source tree, use the instructions in
        <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>.
      </p></li><li class="listitem"><p>
        <span class="bold"><strong>Perform any necessary postinstallation
        setup.</strong></span>
      </p><p>
        After installing MySQL, see <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>
        for information about making sure the MySQL server is working
        properly. Also refer to the information provided in
        <a class="xref" href="installing.html#default-privileges" title="2.10.4 Securing the Initial MySQL Account">Section 2.10.4, “Securing the Initial MySQL Account”</a>. This section describes how
        to secure the initial MySQL <code class="literal">root</code> user
        account, <span class="emphasis"><em>which has no password</em></span> until you
        assign one. The section applies whether you install MySQL using
        a binary or source distribution.
      </p></li><li class="listitem"><p>
        If you want to run the MySQL benchmark scripts, Perl support for
        MySQL must be available. See <a class="xref" href="installing.html#perl-support" title="2.13 Perl Installation Notes">Section 2.13, “Perl Installation Notes”</a>.
</p></li></ol>
</div>
<p>
    Instructions for installing MySQL on different platforms and
    environments is available on a platform by platform basis:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        <span class="bold"><strong>Unix, Linux, FreeBSD</strong></span>
      </p><p>
        For instructions on installing MySQL on most Linux and Unix
        platforms using a generic binary (for example, a
        <code class="filename">.tar.gz</code> package), see
        <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>.
      </p><p>
        For information on building MySQL entirely from the source code
        distributions or the source code repositories, see
        <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>
      </p><p>
        For specific platform help on installation, configuration, and
        building from source see the corresponding platform section:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
            Linux, including notes on distribution specific methods, see
            <a class="xref" href="installing.html#linux-installation" title="2.5 Installing MySQL on Linux">Section 2.5, “Installing MySQL on Linux”</a>.
          </p></li><li class="listitem"><p>
            IBM AIX, see <a class="xref" href="installing.html#solaris-installation" title="2.7 Installing MySQL on Solaris">Section 2.7, “Installing MySQL on Solaris”</a>.
          </p></li><li class="listitem"><p>
            FreeBSD, see <a class="xref" href="installing.html#freebsd-installation" title="2.8 Installing MySQL on FreeBSD">Section 2.8, “Installing MySQL on FreeBSD”</a>.
</p></li></ul>
</div>
</li><li class="listitem"><p>
        <span class="bold"><strong>Microsoft Windows</strong></span>
      </p><p>
        For instructions on installing MySQL on Microsoft Windows, using
        either the MySQL Installer or Zipped binary, see
        <a class="xref" href="installing.html#windows-installation" title="2.3 Installing MySQL on Microsoft Windows">Section 2.3, “Installing MySQL on Microsoft Windows”</a>.
      </p><p>
        For information about managing MySQL instances, see
        <a class="ulink" href="https://dev.mysql.com/doc/mysql-notifier/en/mysql-notifier-overview.html" target="_top">MySQL Notifier Overview</a>.
      </p><p>
        For details and instructions on building MySQL from source code
        using Microsoft Visual Studio, see
        <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>.
      </p></li><li class="listitem"><p>
        <span class="bold"><strong>macOS</strong></span>
      </p><p>
        For installation on macOS, including using both the binary
        package and native PKG formats, see
        <a class="xref" href="installing.html#osx-installation" title="2.4 Installing MySQL on macOS">Section 2.4, “Installing MySQL on macOS”</a>.
      </p><p>
        For information on making use of an macOS Launch Daemon to
        automatically start and stop MySQL, see
        <a class="xref" href="installing.html#osx-installation-launchd" title="2.4.3 Installing and Using the MySQL Launch Daemon">Section 2.4.3, “Installing and Using the MySQL Launch Daemon”</a>.
      </p><p>
        For information on the MySQL Preference Pane, see
        <a class="xref" href="installing.html#osx-installation-prefpane" title="2.4.4 Installing and Using the MySQL Preference Pane">Section 2.4.4, “Installing and Using the MySQL Preference Pane”</a>.
</p></li></ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="general-installation-issues"></a>2.1 General Installation Guidance</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#which-version">2.1.1 Which MySQL Version and Distribution to Install</a></span></dt><dt><span class="section"><a href="installing.html#getting-mysql">2.1.2 How to Get MySQL</a></span></dt><dt><span class="section"><a href="installing.html#verifying-package-integrity">2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG</a></span></dt><dt><span class="section"><a href="installing.html#installation-layouts">2.1.4 Installation Layouts</a></span></dt><dt><span class="section"><a href="installing.html#compiler-characteristics">2.1.5 Compiler-Specific Build Characteristics</a></span></dt></dl>
</div>
<p>
    The immediately following sections contain the information necessary
    to choose, download, and verify your distribution. The instructions
    in later sections of the chapter describe how to install the
    distribution that you choose. For binary distributions, see the
    instructions at <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a> or the
    corresponding section for your platform if available. To build MySQL
    from source, use the instructions in
    <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="which-version"></a>2.1.1 Which MySQL Version and Distribution to Install</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46444444094560"></a><a class="indexterm" name="idm46444444093104"></a><p>
      MySQL is available on a number of operating systems and platforms.
      For information about those platforms that are officially
      supported, see <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_top">https://www.mysql.com/support/supportedplatforms/database.html</a> on the
      MySQL website.
    </p><p>
      When preparing to install MySQL, decide which version and
      distribution format (binary or source) to use.
    </p><a class="indexterm" name="idm46444444088912"></a><a class="indexterm" name="idm46444444087824"></a><a class="indexterm" name="idm46444444086736"></a><a class="indexterm" name="idm46444444085664"></a><a class="indexterm" name="idm46444444084176"></a><p>
      First, decide whether to install a development release or a
      General Availability (GA) release. Development releases have the
      newest features, but are not recommended for production use. GA
      releases, also called production or stable releases, are meant for
      production use. We recommend using the most recent GA release.
    </p><a class="indexterm" name="idm46444444081936"></a><a class="indexterm" name="idm46444444080448"></a><a class="indexterm" name="idm46444444078960"></a><a class="indexterm" name="idm46444444077456"></a><a class="indexterm" name="idm46444444076000"></a><a class="indexterm" name="idm46444444074544"></a><a class="indexterm" name="idm46444444073088"></a><a class="indexterm" name="idm46444444071632"></a><p>
      The naming scheme in MySQL 8.0 uses release names
      that consist of three numbers and an optional suffix (for example,
      <span class="bold"><strong>mysql-8.0.1-dmr</strong></span>). The numbers
      within the release name are interpreted as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The first number (<span class="bold"><strong>8</strong></span>) is the
          major version number.
        </p></li><li class="listitem"><p>
          The second number (<span class="bold"><strong>0</strong></span>) is the
          minor version number. Taken together, the major and minor
          numbers constitute the release series number. The series
          number describes the stable feature set.
        </p></li><li class="listitem"><p>
          The third number (<span class="bold"><strong>1</strong></span>) is the
          version number within the release series. This is incremented
          for each new bugfix release. In most cases, the most recent
          version within a series is the best choice.
</p></li></ul>
</div>
<p>
      Release names can also include a suffix to indicate the stability
      level of the release. Releases within a series progress through a
      set of suffixes to indicate how the stability level improves. The
      possible suffixes are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <span class="bold"><strong>dmr</strong></span> indicates a development
          milestone release (DMR). MySQL development uses a milestone
          model, in which each milestone introduces a small subset of
          thoroughly tested features. From one milestone to the next,
          feature interfaces may change or features may even be removed,
          based on feedback provided by community members who try these
          earily releases. Features within milestone releases may be
          considered to be of pre-production quality.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>rc</strong></span> indicates a Release
          Candidate (RC). Release candidates are believed to be stable,
          having passed all of MySQL's internal testing. New features
          may still be introduced in RC releases, but the focus shifts
          to fixing bugs to stabilize features introduced earlier within
          the series.
        </p></li><li class="listitem"><p>
          Absence of a suffix indicates a General Availability (GA) or
          Production release. GA releases are stable, having
          successfully passed through the earlier release stages, and
          are believed to be reliable, free of serious bugs, and
          suitable for use in production systems.
</p></li></ul>
</div>
<p>
      Development within a series begins with DMR releases, followed by
      RC releases, and finally reaches GA status releases.
    </p><p>
      After choosing which MySQL version to install, decide which
      distribution format to install for your operating system. For most
      use cases, a binary distribution is the right choice. Binary
      distributions are available in native format for many platforms,
      such as RPM packages for Linux or DMG packages for macOS.
      Distributions are also available in more generic formats such as
      Zip archives or compressed <span class="command"><strong>tar</strong></span> files. On
      Windows, you can use <a class="link" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">the MySQL
      Installer</a> to install a binary distribution.
    </p><p>
      Under some circumstances, it may be preferable to install MySQL
      from a source distribution:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You want to install MySQL at some explicit location. The
          standard binary distributions are ready to run at any
          installation location, but you might require even more
          flexibility to place MySQL components where you want.
        </p></li><li class="listitem"><p>
          You want to configure <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with features
          that might not be included in the standard binary
          distributions. Here is a list of the most common extra options
          used to ensure feature availability:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <a class="link" href="installing.html#option_cmake_with_libwrap"><code class="option">-DWITH_LIBWRAP=1</code></a> for TCP
              wrappers support.
            </p></li><li class="listitem"><p>
              <a class="link" href="installing.html#option_cmake_with_zlib"><code class="option">-DWITH_ZLIB={system|bundled}</code></a>
              for features that depend on compression
            </p></li><li class="listitem"><p>
              <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">-DWITH_DEBUG=1</code></a> for debugging
              support
</p></li></ul>
</div>
<p>
          For additional information, see
          <a class="xref" href="installing.html#source-configuration-options" title="2.9.7 MySQL Source-Configuration Options">Section 2.9.7, “MySQL Source-Configuration Options”</a>.
        </p></li><li class="listitem"><p>
          You want to configure <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> without some
          features that are included in the standard binary
          distributions.
        </p></li><li class="listitem"><p>
          You want to read or modify the C and C++ code that makes up
          MySQL. For this purpose, obtain a source distribution.
        </p></li><li class="listitem"><p>
          Source distributions contain more tests and examples than
          binary distributions.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="getting-mysql"></a>2.1.2 How to Get MySQL</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444444038096"></a><a class="indexterm" name="idm46444444037024"></a><a class="indexterm" name="idm46444444035952"></a><a class="indexterm" name="idm46444444034464"></a><a class="indexterm" name="idm46444444033392"></a><a class="indexterm" name="idm46444444032320"></a><p>
      Check our downloads page at <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">https://dev.mysql.com/downloads/</a>
      for information about the current version of MySQL and for
      downloading instructions. For a complete up-to-date list of MySQL
      download mirror sites, see
      <a class="ulink" href="https://dev.mysql.com/downloads/mirrors.html" target="_top">https://dev.mysql.com/downloads/mirrors.html</a>. You can also find
      information there about becoming a MySQL mirror site and how to
      report a bad or out-of-date mirror.
    </p><p>
      For RPM-based Linux platforms that use Yum as their package
      management system, MySQL can be installed using the
      <a class="ulink" href="https://dev.mysql.com/downloads/repo/yum/" target="_top">MySQL Yum
      Repository</a>. See
      <a class="xref" href="installing.html#linux-installation-yum-repo" title="2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository">Section 2.5.1, “Installing MySQL on Linux Using the MySQL Yum Repository”</a> for details.
    </p><p>
      For Debian-based Linux platforms, MySQL can be installed using the
      <a class="ulink" href="https://dev.mysql.com/downloads/repo/apt/" target="_top">MySQL APT
      Repository</a>. See
      <a class="xref" href="installing.html#linux-installation-apt-repo" title="2.5.2 Installing MySQL on Linux Using the MySQL APT Repository">Section 2.5.2, “Installing MySQL on Linux Using the MySQL APT Repository”</a> for details.
    </p><p>
      For SUSE Linux Enterprise Server (SLES) platforms, MySQL can be
      installed using the
      <a class="ulink" href="https://dev.mysql.com/downloads/repo/suse/" target="_top">MySQL SLES
      Repository</a>. See
      <a class="xref" href="installing.html#linux-installation-sles-repo" title="2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository">Section 2.5.3, “Installing MySQL on Linux Using the MySQL SLES Repository”</a> for details.
    </p><p>
      To obtain the latest development source, see
      <a class="xref" href="installing.html#installing-development-tree" title="2.9.5 Installing MySQL Using a Development Source Tree">Section 2.9.5, “Installing MySQL Using a Development Source Tree”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="verifying-package-integrity"></a>2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG</h3>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#verifying-md5-checksum">2.1.3.1 Verifying the MD5 Checksum</a></span></dt><dt><span class="section"><a href="installing.html#checking-gpg-signature">2.1.3.2 Signature Checking Using GnuPG</a></span></dt><dt><span class="section"><a href="installing.html#checking-gpg-signature-windows">2.1.3.3 Signature Checking Using Gpg4win for Windows</a></span></dt><dt><span class="section"><a href="installing.html#checking-rpm-signature">2.1.3.4 Signature Checking Using RPM</a></span></dt></dl>
</div>
<p>
      After downloading the MySQL package that suits your needs and
      before attempting to install it, make sure that it is intact and
      has not been tampered with. There are three means of integrity
      checking:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          MD5 checksums
        </p></li><li class="listitem"><p>
          Cryptographic signatures using <code class="literal">GnuPG</code>, the
          GNU Privacy Guard
        </p></li><li class="listitem"><p>
          For RPM packages, the built-in RPM integrity verification
          mechanism
</p></li></ul>
</div>
<p>
      The following sections describe how to use these methods.
    </p><p>
      If you notice that the MD5 checksum or GPG signatures do not
      match, first try to download the respective package one more time,
      perhaps from another mirror site.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="verifying-md5-checksum"></a>2.1.3.1 Verifying the MD5 Checksum</h4>
</div>
</div>
</div>
<p>
        After you have downloaded a MySQL package, you should make sure
        that its MD5 checksum matches the one provided on the MySQL
        download pages. Each package has an individual checksum that you
        can verify against the package that you downloaded. The correct
        MD5 checksum is listed on the downloads page for each MySQL
        product, and you will compare it against the MD5 checksum of the
        file (product) that you download.
      </p><p>
        Each operating system and setup offers its own version of tools
        for checking the MD5 checksum. Typically the command is named
        <span class="command"><strong>md5sum</strong></span>, or it may be named
        <span class="command"><strong>md5</strong></span>, and some operating systems do not ship
        it at all. On Linux, it is part of the <span class="bold"><strong>GNU
        Text Utilities</strong></span> package, which is available for a wide
        range of platforms. You can also download the source code from
        <a class="ulink" href="http://www.gnu.org/software/textutils/" target="_top">http://www.gnu.org/software/textutils/</a>. If you
        have OpenSSL installed, you can use the command <span class="command"><strong>openssl
        md5 <em class="replaceable"><code>package_name</code></em></strong></span> instead. A
        Windows implementation of the <span class="command"><strong>md5</strong></span> command
        line utility is available from
        <a class="ulink" href="http://www.fourmilab.ch/md5/" target="_top">http://www.fourmilab.ch/md5/</a>.
        <span class="command"><strong>winMd5Sum</strong></span> is a graphical MD5 checking tool
        that can be obtained from
        <a class="ulink" href="http://www.nullriver.com/index/products/winmd5sum" target="_top">http://www.nullriver.com/index/products/winmd5sum</a>.
        Our Microsoft Windows examples will assume the name
        <span class="command"><strong>md5.exe</strong></span>.
      </p><p>
        Linux and Microsoft Windows examples:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>md5sum mysql-standard-8.0.22-linux-i686.tar.gz</code></strong>
aaab65abbec64d5e907dcd41b8699945  mysql-standard-8.0.22-linux-i686.tar.gz
</pre><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>md5.exe mysql-installer-community-8.0.22.msi</code></strong>
aaab65abbec64d5e907dcd41b8699945  mysql-installer-community-8.0.22.msi
</pre><p>
        You should verify that the resulting checksum (the string of
        hexadecimal digits) matches the one displayed on the download
        page immediately below the respective package.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Make sure to verify the checksum of the <span class="emphasis"><em>archive
          file</em></span> (for example, the <code class="filename">.zip</code>,
          <code class="filename">.tar.gz</code>, or <code class="filename">.msi</code>
          file) and not of the files that are contained inside of the
          archive. In other words, verify the file before extracting its
          contents.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="checking-gpg-signature"></a>2.1.3.2 Signature Checking Using GnuPG</h4>

</div>

</div>

</div>
<p>
        Another method of verifying the integrity and authenticity of a
        package is to use cryptographic signatures. This is more
        reliable than using <a class="link" href="installing.html#verifying-md5-checksum" title="2.1.3.1 Verifying the MD5 Checksum">MD5
        checksums</a>, but requires more work.
      </p><p>
        We sign MySQL downloadable packages with
        <span class="command"><strong>GnuPG</strong></span> (GNU Privacy Guard).
        <span class="command"><strong>GnuPG</strong></span> is an Open Source alternative to the
        well-known Pretty Good Privacy (<span class="command"><strong>PGP</strong></span>) by Phil
        Zimmermann. Most Linux distributions ship with
        <span class="command"><strong>GnuPG</strong></span> installed by default. Otherwise, see
        <a class="ulink" href="http://www.gnupg.org/" target="_top">http://www.gnupg.org/</a> for more information about
        <span class="command"><strong>GnuPG</strong></span> and how to obtain and install it.
      </p><p>
        To verify the signature for a specific package, you first need
        to obtain a copy of our public GPG build key, which you can
        download from <a class="ulink" href="http://pgp.mit.edu/" target="_top">http://pgp.mit.edu/</a>. The key that
        you want to obtain is named
        <code class="literal">mysql-build@oss.oracle.com</code>. Alternatively,
        you can copy and paste the key directly from the following text:
      </p><pre data-lang="none" class="programlisting">-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q2TXlTUUwgUmVs
ZWFzZSBFbmdpbmVlcmluZyA8bXlzcWwtYnVpbGRAb3NzLm9yYWNsZS5jb20+iGwE
ExECACwCGyMCHgECF4ACGQEGCwkIBwMCBhUKCQgCAwUWAgMBAAUCXEBY+wUJI87e
5AAKCRCMcY07UHLh9RZPAJ9uvm0zlzfCN+DHxHVaoFLFjdVYTQCfborsC9tmEZYa
whhogjeBkZkorbyIaQQTEQIAKQIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkB
BQJTAdRmBQkaZsvLAAoJEIxxjTtQcuH1X4MAoKNLWAbCBUj96637kv6Xa/fJuX5m
AJwPtmgDfjUe2iuhXdTrFEPT19SB6ohmBBMRAgAmAhsjBgsJCAcDAgQVAggDBBYC
AwECHgECF4AFAk53PioFCRP7AhUACgkQjHGNO1By4fUmzACeJdfqgc9gWTUhgmcM
AOmG4RjwuxcAoKfM+U8yMOGELi+TRif7MtKEms6piGkEExECACkCGyMGCwkIBwMC
BBUCCAMEFgIDAQIeAQIXgAIZAQUCUZSROgUJFTchqgAKCRCMcY07UHLh9YtAAJ9X
rA/ymlmozPZn+A9ls8/uwMcTsQCfaQMNq1dNkhH2kyByc3Rx9/W2xfqJARwEEAEC
AAYFAlAS6+UACgkQ8aIC+GoXHivrWwf/dtLk/x+NC2VMDlg+vOeM0qgG1IlhXZfi
NsEisvvGaz4m8fSFRGe+1bvvfDoKRhxiGXU48RusjixzvBb6KTMuY6JpOVfz9Dj3
H9spYriHa+i6rYySXZIpOhfLiMnTy7NH2OvYCyNzSS/ciIUACIfH/2NH8zNT5CNF
1uPNRs7HsHzzz7pOlTjtTWiF4cq/Ij6Z6CNrmdj+SiMvjYN9u6sdEKGtoNtpycgD
5HGKR+I7Nd/7v56yhaUe4FpuvsNXig86K9tI6MUFS8CUyy7Hj3kVBZOUWVBM053k
nGdALSygQr50DA3jMGKVl4ZnHje2RVWRmFTr5YWoRTMxUSQPMLpBNIkBHAQQAQIA
BgUCU1B+vQAKCRAohbcD0zcc8dWwCACWXXWDXIcAWRUw+j3ph8dr9u3SItljn3wB
c7clpclKWPuLvTz7lGgzlVB0s8hH4xgkSA+zLzl6u56mpUzskFl7f1I3Ac9GGpM4
0M5vmmR9hwlD1HdZtGfbD+wkjlqgitNLoRcGdRf/+U7x09GhSS7Bf339sunIX6sM
gXSC4L32D3zDjF5icGdb0kj+3lCrRmp853dGyA3ff9yUiBkxcKNawpi7Vz3D2ddU
pOF3BP+8NKPg4P2+srKgkFbd4HidcISQCt3rY4vaTkEkLKg0nNA6U4r0YgOa7wIT
SsxFlntMMzaRg53QtK0+YkH0KuZR3GY8B7pi+tlgycyVR7mIFo7riQEcBBABCAAG
BQJWgVd0AAoJEEZu4b/gk4UKk9MH/Rnt7EccPjSJC5CrB2AU5LY2Dsr+PePI2ubP
WsEdG82qSjjGpbhIH8LSg/PzQoGHiFWMmmZWJktRT+dcgLbs3b2VwCNAwCE8jOHd
UkQhEowgomdNvHiBHKHjP4/lF68KOPiO/2mxYYkmpM7BWf3kB57DJ5CTi3/JLoN7
zF40qIs/p09ePvnwStpglbbtUn7XPO+1/Ee8VHzimABom52PkQIuxNiVUzLVn3bS
Wqrd5ecuqLk6yzjPXd2XhDHWC9Twpl68GePru6EzQtusi0m6S/sHgEXqh/IxrFZV
JlljF75JvosZq5zeulr0i6kOij+Y1p6MFffihITZ1gTmk+CLvK2JASIEEAECAAwF
Ak53QS4FAwASdQAACgkQlxC4m8pXrXwJ8Qf/be/UO9mqfoc2sMyhwMpN4/fdBWwf
LkA12FXQDOQMvwH9HsmEjnfUgYKXschZRi+DuHXe1P7l8G2aQLubhBsQf9ejKvRF
TzuWMQkdIq+6Koulxv6ofkCcv3d1xtO2W7nb5yxcpVBPrRfGFGebJvZa58DymCNg
yGtAU6AOz4veavNmI2+GIDQsY66+tYDvZ+CxwzdYu+HDV9HmrJfc6deM0mnBn7SR
jqzxJPgoTQhihTav6q/R5/2p5NvQ/H84OgS6GjosfGc2duUDzCP/kheMRKfzuyKC
OHQPtJuIj8++gfpHtEU7IDUX1So3c9n0PdpeBvclsDbpRnCNxQWU4mBot4kBIgQQ
AQIADAUCToi2GQUDABJ1AAAKCRCXELibyletfLZAB/9oRqx+NC98UQD/wlxCRytz
vi/MuPnbgQUPLHEap10tvEi33S/H/xDR/tcGofY4cjAvo5skZXXeWq93Av7PACUb
zkg0X0eSr2oL6wy66xfov72AwSuX+iUK68qtKaLqRLitM02y8aNRV/ggKvt7UMvG
mOvs5yLaYlobyvGaFC2ClfkNOt2MlVnQZCmnYBCwOktPGkExiu2yZMifcYGxQcpH
KVFG59KeF2cM2d4xYM8HJqkSGGW306LFVSyeRwG+wbttgLpD5bM/T2b3fF/J35ra
CSMLZearRTq8aygPl+XM7MM2eR946aw6jmOsgNBErbvvIdQj6LudAZj+8imcXV2K
iQEiBBABAgAMBQJOmdnRBQMAEnUAAAoJEJcQuJvKV618AvIIAIEF1ZJ+Ry7WOdKF
5oeQ/ynaYUigzN92fW/9zB8yuQlngkFJGidYMbci1tR1siziIVJFusR3ZonqAPGK
/SUta9Y6KWLhmc7c5UnEHklq/NfdMZ2WVSIykXlctqw0sbb+z1ecEd4G8u9j5ill
MO1B36rQayYAPoeXLX8dY4VyFLVGaQ00rWQBYFZrpw16ATWbWGJP332NSfCk4zZq
6kXEW07q0st3YBgAAGdNQyEeZCa4d4pBRSX6189Kjg6GDnIcaiOF6HO6PLr9fRlL
r5ObCgU+G9gEhfiVwDEV9E+7/Bq2pYZ9whhkBqWQzdpXTNTM24uaEhE01EPO5zeC
O214q6mJASIEEAECAAwFAk6rpgEFAwASdQAACgkQlxC4m8pXrXzAhwf/f9O99z16
3Y5FZVIxexyqXQ/Mct9uKHuXEVnRFYbA49dQLD4S73N+zN7gn9jFeQcBo4w8qVUV
94U/ta/VbLkdtNREyplPM4XY8YE5Wfd9bfyg3q1PbEiVjk995sBF+2+To99YYKst
gXPqjlH0jUfEyDmexOj+hsp8Rc63kvkIx36VBa4ONRYFefGAhKDMigL2YAhc1UkG
tkGTuLmlCGwIV6lviDZD3RJf5375VFnaHv7eXfwQxCwE+BxG3CURrjfxjaxMTmMP
yAG2rhDp5oTUEvqDYNbko5UxYOmrSjvF4FzXwqerElXJUkUzSh0pp7RxHB/1lCxD
s7D1F1hlgFQuNIkBIgQQAQIADAUCTrzZHAUDABJ1AAAKCRCXELibyletfMUpB/4s
07dREULIBnA1D6qr3fHsQJNZqbAuyDlvgGGLWzoyEDs+1JMFFlaa+EeLIo1386GU
2DammDC23p3IB79uQhJeD2Z1TcVg4cA64SfF/CHca5coeRSrdAiudzU/cgLGtXIP
/OaFamXgdMxAhloLFbSHPCZkyb00phVa8+xeIVDrK1HByZsNIXy/SSK8U26S2PVZ
2o14fWvKbJ1Aga8N6DuWY/D8P2mi3RAbiuZgfzkmKL5idH/wSKfnFKdTgJzssdCc
1jZEGVk5rFYcWOrJARHeP/tsnb/UxKBEsNtO7e3N2e/rLVnEykVIO066hz7xZK/V
NBSpx3k3qj4XPK41IHy2iQEiBBABAgAMBQJOzqO8BQMAEnUAAAoJEJcQuJvKV618
2twH/0IzjXLxN45nvIfEjC75a+i9ZSLlqR8lsHL4GpEScFKI0a0lT4IVAIY2RKG+
MAs2eHm0UfKuwGs5jluRZ9RqKrc61sY0XQV9/7znY9Db16ghX04JjknOKs/fPi87
rvKkB/QxJWS8qbb/erRmW+cPNjbRxTFPS5JIwFWHA16ieFEpvdAgKV6nfvJVTq1r
jPDcnIA9CJN2SmUFx9Qx3SRc6ITbam1hjFnY6sCh6AUhxLI2f1mq1xH9PqEy42Um
68prRqTyJ7Iox1g/UDDkeeUcAg7T1viTz7uXpS3Wrq4zzo4yOpaJfLDR3pI5g2Zk
SNGTMo6aySE4OABt8i1Pc1Pm6AmJASIEEAECAAwFAk7yPFYFAwASdQAACgkQlxC4
m8pXrXzXiAf9FrXe0lgcPM+tYOWMLhv5gXJi2VUBaLxpyRXm/kJcmxInKq1GCd3y
D4/FLHNu3ZcCz/uklPAbZXWI0O6ewq0LWsRtklmJjWiedH+hGyaTv95VklojRIBd
8nBaJ6M98rljMBHTFwWvjQFVf4FLRJQZqHlvjcCkq2Dd9BWJpGXvr/gpKkmMJYNK
/ftfZRcChb35NI19WRpOhj9u808OPcqKVvZBcPwFGV5cEBzmAC94J7JcD8+S8Ik8
iUJMQGGL3QcmZOBozovh86hj7KTSEBHlLXl832z89H1hLeuLbnXoGLv3zeUFSxkv
1h35LhZLqIMDQRXLuUzxGHMBpLhPyGWRJ4kBIgQQAQIADAUCTwQJFwUDABJ1AAAK
CRCXELibyletfABvB/9Cy69cjOqLGywITs3Cpg//40jmdhSAVxilJivP6J5bubFH
DJlVTx541Dv5h4hTG2BQuueQ4q1VCpSGW+rHcdhPyvmZGRz1rxdQQGh1Dv0Bod2c
3PJVSYPSrRSwCZJkJHOtVRBdjK4mkZb5aFTza+Tor9kxzj4FcXVd4KAS+hHQHYHc
Ar8tt2eOLzqdEFTULeGiSoNn+PVzvzdfhndphK+8F2jfQ2UKuc01O7k0Yn9xZVx0
OG6fE1gStzLv7C5amWLRd8+xh+MN0G8MgNglpBoExsEMMlPBYSUHa6lxpdMNMuib
rIyVncE9X8QOhImt8K0sNn/EdbuldJNGYbDLt7O4iQEiBBABAgAMBQJPFdTcBQMA
EnUAAAoJEJcQuJvKV6184owH+wZ/uLpezXnSxigeH1sig72QEXMrNd5DVHCJdig3
bo+K5YmmN710/m5z+63XKUEWpd6/knajObgckThzWftNeK1SSFQGPmoYZP9EZnSU
7L+/dSUpExbj842G5LYagrCyMGtlxRywWEmbi72TKS/JOK0jLiOdvVy+PHrZSu0D
TVQ7cJh1BmPsbz7zzxjmcI5l+7B7K7RHZHq45nDLoIabwDacj7BXvBK0Ajqz4QyJ
GQUjXC7q+88I+ptPvOXlE5nI/NbiCJOMI6d/bWN1KwYrC80fZuFaznfQFcPyUaDw
yRaun+K3kEji2wXecq+yMmLUEp01TKsUeOL50HD6hHH07W+JASIEEAECAAwFAk85
bQsFAwASdQAACgkQlxC4m8pXrXwKPQgAlkbUsTr7nkq+haOk0jKpaHWEbRMEGMrB
I3F7E+RDO6V/8y4Jtn04EYDc8GgZMBah+mOgeINq3y8jRMYV5jVtZXv2MWYFUcjM
kVBKeqhi/pGEjmUdmdt3DlPv3Z+fMTMRmAocI981iY/go8PVPg/+nrR6cFK2xxnO
R8TacikJBFeSfkkORg1tDzjjYv1B5ZIEkpplepl5ahJBBq7cpYhTdY6Yk0Sz0J8w
EdffLSaNxrRuWLrRhWzZU7p9bFzfb/7OHc21dJnB7wKv5VvtgE+jiQw9tOKaf5hc
SgRYuF6heu+B25gc5Uu88lo409mZ7oxQ6hDCn7JHvzh0rhmSN+Kid4kBIgQQAQIA
DAUCT0qQrQUDABJ1AAAKCRCXELibyletfC9UB/4o2ggJYM0CLxEpP0GU8UKOh3+/
zm1DN7Qe4kY2iCtF1plKHQaTgt5FlgRCFaiXcVv7WzGz/FnmxonR1leLl+kfRlwy
PPnoI/AWPCy/NO4Cl5KnjsSmsdDUpObwZ4KYsdilZR7ViJu2swdAIgnXBUwrlRJR
7CK4TAKrTeonRgVSrVx8Vt//8/cYj73CLq8oY/KK0iHiQrSwo44uyhdiFIAssjyX
n6/2E+w0zgvPexNSNNROHQ8pjbq+NTY6GwKIGsaej3UTRwQ7psvKXz8y7xdzmOAr
/khGvxB5gjkx02pimjeia8v66aH6rbnojJMAovNUS4EHdHnulv4rovC8Kf9iiQEi
BBABAgAMBQJPVdsaBQMAEnUAAAoJEJcQuJvKV618vVEIALFXPBzcAO1SnQarBLzy
YMVZZumPvSXKnUHAO+6kjApXPJ+qFRdUaSNshZxVKY9Zryblu4ol/fLUTt0CliSD
IxD6L4GXEm4VYYCl4lPO3bVsJnGITLFwQGHM27EmjVoTiD8Ch7kPq2EXr3dMRgzj
pdz+6aHGSUfOdLTPXufDvW83bEWGaRVuTJKw+wIrcuRqQ+ucWJgJGwcE4zeHjZad
Jx1XUm1X+BbI73uiQussyjhhQVVNU7QEdrjyuscaZ/H38wjUwNbylxDPB4I8quC1
knQ0wSHr7gKpM+E9nhiS14poRqU18u78/sJ2MUPXnQA6533IC238/LP8JgqB+BiQ
BTSJASIEEAECAAwFAk9ng3cFAwASdQAACgkQlxC4m8pXrXxQRAf/UZlkkpFJj1om
9hIRz7gS+l7YvTaKSzpo+TBcx3C7aqKJpir6TlMK9cb9HGTHo2Xp1N3FtQL72NvO
6CcJpBURbvSyb4i0hrm/YcbUC4Y3eajWhkRS3iVfGNFbc/rHthViz0r6Y5lhXX16
aVkDv5CIFWaF3BiUK0FnHrZiy4FPacUXCwEjv3uf8MpxV5oEmo8Vs1h4TL3obyUz
qrImFrEMYE/12lkE8iR5KWCaF8eFyl56HL3PPl90JMQBXzhwsFoWCPuwjfM5w6sW
Ll//zynwxtlJ9CRz9c2vK6aJ8DRu3OfBKN1iiEcNEynksDnNXErn5xXKz3p5pYdq
e9BLzUQCDYkBIgQQAQIADAUCT3inRgUDABJ1AAAKCRCXELibyletfGMKCADJ97qk
geBntQ+tZtKSFyXznAugYQmbzJld8U6eGSQnQkM40Vd62UZLdA8MjlWKS8y4A4L2
0cI14zs5tKG9Q72BxQOw5xkxlLASw1/8WeYEbw7ZA+sPG//q9v3kIkru3sv64mMA
enZtxsykexRGyCumxLjzlAcL1drWJGUYE2Kl6uzQS7jb+3PNBloQvz6nb3YRZ+Cg
Ly9D41SIK+fpnV8r4iqhu7r4LmAQ7Q1DF9aoGaYvn2+xLGyWHxJAUet4xkMNOLp6
k9RF1nbNe4I/sqeCB25CZhCTEvHdjSGTD2yJR5jfoWkwO9w8DZG1Q9WrWqki4hSB
l0cmcvO34pC1SJYziQEiBBABAgAMBQJPinQFBQMAEnUAAAoJEJcQuJvKV618CFEI
AJp5BbcV7+JBMRSvkoUcAWDoJSP2ug9zGw5FB8J90PDefKWCKs5Tjayf2TvM5ntq
5DE9SGaXbloIwa74FoZlgqlhMZ4AtY9Br+oyPJ5S844wpAmWMFc6NnEPFaHQkQ+b
dJYpRVNd9lzagJP261P3S+S9T2UeHVdOJBgWIq9Mbs4lnZzWsnZfQ4Lsz0aPqe48
tkU8hw+nflby994qIwNOlk/u+I/lJbNz5zDY91oscXTRl2jV1qBgKYwwCXxyB3j9
fyVpRl+7QnqbTWcCICVFL+uuYpP0HjdoKNqhzEguAUQQLOB9msPTXfa2hG+32ZYg
5pzI5V7GCHq0KO6u5Ctj3TGJASIEEAECAAwFAk+cQEEFAwASdQAACgkQlxC4m8pX
rXzi7AgAx8wJzNdD7UlgdKmrAK//YqH7arSssb33Xf45sVHDpUVA454DXeBrZpi+
zEuo03o5BhAuf38cwfbkV6jN1mC2N0FZfpy4v7RxHKLYr7tr6r+DRn1L1giX5ybx
CgY0fLAxkwscWUKGKABWxkz9b/beEXaO2rMt+7DBUdpAOP5FNRQ8WLRWBcMGQiaT
S4YcNDAiNkrSP8CMLQP+04hQjahxwCgBnksylciqz3Y5/MreybNnTOrdjVDsF0Oe
t0uLOiWXUZV1FfaGIdb/oBQLg+e1B74p5+q3aF8YI97qAZpPa1qiQzWIDX8LX9QX
EFyZ3mvqzGrxkFoocXleNPgWT8fRuokBIgQQAQIADAUCT64N/QUDABJ1AAAKCRCX
ELibyletfDOGCACKfcjQlSxrWlEUrYYZpoBP7DE+YdlIGumt5l6vBmxmt/5OEhqr
+dWwuoiyC5tm9CvJbuZup8anWfFzTTJmPRPsmE4z7Ek+3CNMVM2wIynsLOt1pRFK
4/5RNjRLbwI6EtoCQfpLcZJ//SB56sK4DoFKH28Ok4cplESPnoMqA3QafdSEA/FL
qvZV/iPgtTz7vjQkMgrXAIUM4fvKe3iXkAExGXtmgdXHVFoKmHrxJ2DTSvM7/19z
jGJeu2MhIKHyqEmCk6hLjxyCE5pAH59KlbAQOP1bS28xlRskBApm2wN+LOZWzC62
HhEReQ50inCGuuubK0PqUQnyYc+lUFxrFpcliQEiBBABAgAMBQJPv9lVBQMAEnUA
AAoJEJcQuJvKV618AzgH/iRFFCi4qjvoqji1fi7yNPZVOMMO2H13Ks+AfcjRtHuV
aa30u50ND7TH+XQe6yerTapLh3aAm/sNP99aTxIuwRSlyKEoDs93+XVSgRqPBgbF
/vxv0ykok3p6L9DxFO/w5cL8JrBhMZoJrEkIBFkwN8tWlcXPRFQvcdBYv3M3DTZU
qY+UHnOxHvSzsl+LJ0S9Xcd9C5bvYfabmYJvG5eRS3pj1L/y3a6yw6hvY+JtnQAk
t05TdeHMIgQH/zb8V9wxDzmE0un8LyoC2Jx5TpikQsJSejwK6b3coxVBlngku6+C
qDAimObZLw6H9xYYIK0FoJs7j5bQZEwUO7OLBgjcMOqJASIEEAECAAwFAk/Rpc8F
AwASdQAACgkQlxC4m8pXrXw49Qf/TdNbun2htQ+cRWarszOx8BLEiW/x6PVyUQpZ
nV/0qvhKzlJUjM9hQPcA0AsOjhqtCN6Cy8KXbK/TvPm9D/Nk6HWwD1PomzrJVFk2
ywGFIuTR+lluKSp7mzm5ym0wJs5cPq731Im31RUQU8ndjLrq9YOf5FVL8NqmcOAU
4E8d68BbmVCQC5MMr0901FKwKznShfpy7VYN25/BASj8dhnynBYQErqToOJB6Cnd
JhdTlbfR4SirqAYZZg3XeqGhByytEHE1x7FMWWFYhdNtsnAVhYBbWqAzBs8lF9Jd
Mhaf0VQU/4z10gVrRtXLR/ixrCi+P4cM/fOQkqd6pwqWkaXt6okBIgQQAQIADAUC
T+NxIAUDABJ1AAAKCRCXELibyletfFBBCAC6+0TUJDcNaqOxOG1KViY6KYg9NCL8
pwNK+RKNK/N1V+WGJQH7qDMwRoOn3yogrHax4xIeOWiILrvHK0O6drS1DjsymIhR
Sm2XbE/8pYmEbuJ9vHh3b/FTChmSAO7dDjSKdWD3dvaY8lSsuDDqPdTX8FzOfrXC
M22C/YPg7oUG2A5svE1b+yismP4KmVNWAepEuPZcnEMPFgop3haHg9X2+mj/btDB
Yr6p9kAgIY17nigtNTNjtI0dMLu43aIzedCYHqOlNHiB049jkJs54fMGBjF9qPtc
m0k44xyKd1/JXWMdNUmtwKsChAXJS3YOciMgIx6tqYUTndrP4I6q1rfriQEiBBAB
AgAMBQJP9T1VBQMAEnUAAAoJEJcQuJvKV618J9wIAI1lId9SMbEHF6PKXRe154lE
pap5imMU/lGTj+9ZcXmlf8o2PoMMmb3/E1k+EZUaeSBoOmjS8C2gwd5XFwRrlwAD
RlK/pG5XsL4h5wmN2fj1ororrJXvqH427PLRQK9yzdwG4+9HTBOxjoS8qZT9plyK
AJZzAydAMqyseRHgNo0vMwlgrs4ojo+GcFGQHrF3IaUjvVfUPOmIj7afopFdIZmI
GaSF0TXBzqcZ1chFv/eTBcIuIKRvlaDee5FgV7+nLH2nKOARCLvV/+8uDi2zbr83
Ip5x2tD3XuUZ0ZWxD0AQWcrLdmGb4lkxbGxvCtsaJHaLXWQ2m760RjIUcwVMEBKJ
ASIEEAECAAwFAlAGYWsFAwASdQAACgkQlxC4m8pXrXwyVAgAvuvEl6yuGkniWOlv
uHEusUv/+2GCBg6qV+IEpVtbTCCgiFjYR5GasSp1gpZ5r4BocOlbGdjdJGHTpyK8
xD1i+6qZWUYhNRg2POXUVzcNEl2hhouwPLOifcmTwAKU76TEv3L5STviL3hWgUR2
yEUZ3Ut0IGVV6uPER9jpR3qd6O3PeuFkwf+NaGTye4jioLAy3aYwtZCUXzvYmNLP
90K4y+5yauZteLmNeq26miKC/NQu4snNFClPbGRjHD1ex9KDiAMttOgN4WEq7srT
rYgtT531WY4deHpNgoPlHPuAfC0H+S6YWuMbgfcb6dV+Rrd8Ij6zM3B/PcjmsYUf
OPdPtIkBIgQQAQIADAUCUBgtfQUDABJ1AAAKCRCXELibyletfAm3CACQlw21Lfeg
d8RmIITsfnFG/sfM3MvZcjVfEAtsY3fTK9NiyU0B3yX0PU3ei37qEW+50BzqiStf
5VhNvLfbZR+yPou7o2MAP31mq3Uc6grpTV64BRIkCmRWg40WMjNI1hv7AN/0atgj
ATYQXgnEw7mfFb0XZtMTD6cmrz/A9nTPVgZDxzopOMgCCC1ZK4Vpq9FKdCYUaHpX
3sqnDf+gpVIHkTCMgWLYQOeX5Nl+fgnq6JppaQ3ySZRUDr+uFUs0uvDRvI/cn+ur
ri92wdDnczjFumKvz/cLJAg5TG2Jv1Jx3wecALsVqQ3gL7f7vr1OMaqhI5FEBqdN
29L9cZe/ZmkriQEiBBIBCgAMBQJVoNxyBYMHhh+AAAoJEEoz7NUmyPxLD1EH/2eh
7a4+8A1lPLy2L9xcNt2bifLfFP2pEjcG6ulBoMKpHvuTCgtX6ZPdHpM7uUOje/F1
CCN0IPB533U1NIoWIKndwNUJjughtoRM+caMUdYyc4kQm29Se6hMPDfyswXE5Bwe
PmoOm4xWPVOH/cVN04zyLuxdlQZNQF/nJg6PMsz4w5z+K6NGGm24NEPcc72iv+6R
Uc/ry/7v5cVu4hO5+r104mmNV5yLecQF13cHy2JlngIHXPSlxTZbeJX7qqxE7TQh
5nviSPgdk89oB5jFSx4g1efXiwtLlP7lbDlxHduomyQuH9yqmPZMbkJt9uZDc8Zz
MYsDDwlc7BIe5bGKfjqJAhwEEAECAAYFAlSanFIACgkQdzHqU52lcqLdvg//cAEP
qdN5VTKWEoDFjDS4I6t8+0KzdDWDacVFwKJ8RAo1M2SklDxnIvnzysZd2VHp5Pq7
i4LYCZo5lDkertQ6LwaQxc4X6myKY4LTA652ObFqsSfgh9kW+aJBBAyeahPQ8CDD
+Yl23+MY5wTsj4qt7KffNzy78vLbYnVnvRQ3/CboVix0SRzg0I3Oi7n3B0lihvXy
5goy9ikjzZevejMEfjfeRCgoryy9j5RvHH9PF3fJVtUtHCS4f+kxLmbQJ1XqNDVD
hlFzjz8oUzz/8YXy3im5MY7Zuq4P4wWiI7rkIFMjTYSpz/evxkVlkR74qOngT2pY
VHLyJkqwh56i0aXcjMZiuu2cymUt2LB9IsaMyWBNJjXr2doRGMAfjuR5ZaittmML
yZwix9mWVk7tkwlIxmT/IW6Np0qMhDZcWYqPRpf7+MqY3ZYMK4552b8aDMjhXrnO
OwLsz+UI4bZa1r9dguIWIt2C2b5C1RQ9AsQBPwg7h5P+HhRuFAuDKK+vgV8FRuzR
JeKkFqwB4y0Nv7BzKbFKmP+V+/krRv+/Dyz9Bz/jyAQgw02u1tPupH9BGhlRyluN
yCJFTSNj7G+OLU0/l4XNph5OOC7sy+AMZcsL/gsT/TXCizRcCuApNTPDaenACpbv
g8OoIzmNWhh4LXbAUHCKmY//hEw9PvTZA1xKHgyJAhwEEgECAAYFAlJYsKQACgkQ
oirk60MpxUV2XQ//b2/uvThkkbeOegusDC4AZfjnL/V3mgk4iYy4AC9hum0R9oNl
XDR51P1TEw9mC1btHj+7m7Iq1a5ke5wIC7ENZiilr0yPqeWgL5+LC98dz/L85hqA
wIoGeOfMhrlaVbAZEj4yQTAJDA35vZHVsQmp87il0m+fZX04OBLXBzw86EoAAZ7Q
EoH4qFcT9k1T363tvNnIm3mEvkQ5WjE1R9uchJa1g7hdlNQlVkjFmPZrJK9fl4z5
6Dto89Po4Sge48jDH0pias4HATYHsxW819nz5jZzGcxLnFRRR5iITVZi9qzsHP7N
bUh3qxuWCHS9xziXpOcSZY848xXw63Y5jDJfpzupzu/KHj6CzXYJUEEqp9MluoGb
/BCCEPzdZ0ovyxFutM/BRcc6DvE6sTDF/UES21ROqfuwtJ6qJYWX+lBIgyCJvj4o
RdbzxUleePuzqCzmwrIXtoOKW0Rlj4SCeF9yCwUMBTGW5/nCLmN4dwf1KW2RP2Eg
4ERbuUy7QnwRP5UCl+0ISZJyYUISfg8fmPIdQsetUK9Cj+Q5jpB2GXwELXWnIK6h
K/6jXp+EGEXSqdIE53vAFe7LwfHiP/D5M71D2h62sdIOmUm3lm7xMOnM5tKlBiV+
4jJSUmriCT62zo710+6iLGqmUUYlEll6Ppvo8yuanXkYRCFJpSSP7VP0bBqIZgQT
EQIAJgUCTnc9dgIbIwUJEPPzpwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEIxx
jTtQcuH1Ut4AoIKjhdf70899d+7JFq3LD7zeeyI0AJ9Z+YyE1HZSnzYi73brScil
bIV6sbQ7TXlTUUwgUGFja2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkg
PGJ1aWxkQG15c3FsLmNvbT6IbwQwEQIALwUCTnc9rSgdIGJ1aWxkQG15c3FsLmNv
bSB3aWxsIHN0b3Agd29ya2luZyBzb29uAAoJEIxxjTtQcuH1tT0An3EMrSjEkUv2
9OX05JkLiVfQr0DPAJwKtL1ycnLPv15pGMvSzav8JyWN3IhlBBMRAgAdBQJHrJS0
BQkNMFioBQsHCgMEAxUDAgMWAgECF4AAEgkQjHGNO1By4fUHZUdQRwABAa6SAJ9/
PgZQSPNeQ6LvVVzCALEBJOBt7QCffgs+vWP18JutdZc7XiawgAN9vmmITAQTEQIA
DAUCPj6j0QWDCWYAuwAKCRBJUOEqsnKR8iThAJ9ZsR4o37dNGyl77nEqP6RAlJqa
YgCeNTPTEVY+VXHR/yjfyo0bVurRxT2ITAQTEQIADAUCPkKCAwWDCWIiiQAKCRC2
9c1NxrokP5aRAKCIaaegaMyiPKenmmm8xeTJSR+fKQCgrv0TqHyvCRINmi6LPucx
GKwfy7KIRgQQEQIABgUCP6zjrwAKCRCvxSNIeIN0D/aWAKDbUiEgwwAFNh2n8gGJ
Sw/8lAuISgCdHMzLAS26NDP8T2iejsfUOR5sNriIRgQQEQIABgUCP7RDdwAKCRCF
lq+rMHNOZsbDAJ0WoPV+tWILtZG3wYqg5LuHM03faQCeKuVvCmdPtro06xDzeeTX
VrZ14+GIRgQQEQIABgUCQ1uz6gAKCRCL2C5vMLlLXH90AJ0QsqhdAqTAk3SBnO2w
zuSOwiDIUwCdFExsdDtXf1cL3Q4ilo+OTdrTW2CIRgQTEQIABgUCRPEzJgAKCRD2
ScT0YJNTDApxAKCJtqT9LCHFYfWKNGGBgKjka0zi9wCcCG3MvnvBzDUqDVebudUZ
61Sont+ITAQQEQIADAUCQYHLAQWDBiLZiwAKCRAYWdAfZ3uh7EKNAJwPywk0Nz+Z
Lybw4YNQ7H1UxZycaQCePVhY4P5CHGjeYj9SX2gQCE2SNx+ITAQQEQIADAUCQYHL
NAWDBiLZWAAKCRCBwvfr4hO2kiIjAJ0VU1VQHzF7yYVeg+bh31nng9OOkwCeJI8D
9mx8neg4wspqvgXRA8+t2saITAQQEQIADAUCQYHLYgWDBiLZKgAKCRBrcOzZXcP0
cwmqAJsFjOvkY9c5eA/zyMrOZ1uPB6pd4QCdGyzgbYb/eoPu6FMvVI9PVIeNZReI
TAQQEQIADAUCQdCTJAWDBdQRaAAKCRB9JcoKwSmnwmJVAKCG9a+Q+qjCzDzDtZKx
5NzDW1+W+QCeL68seX8OoiXLQuRlifmPMrV2m9+ITAQQEQIADAUCQitbugWDBXlI
0gAKCRDmG6SJFeu5q/MTAKCTMvlCQtLKlzD0sYdwVLHXJrRUvgCffmdeS6aDpwIn
U0/yvYjg1xlYiuqITAQSEQIADAUCQCpZOgWDB3pLUgAKCRA8oR80lPr4YSZcAJwP
4DncDk4YzvDvnRbXW6SriJn1yQCdEy+d0CqfdhM7HGUs+PZQ9mJKBKqITAQSEQIA
DAUCQD36ugWDB2ap0gAKCRDy11xj45xlnLLfAKC0NzCVqrbTDRw25cUss14RRoUV
PACeLpEc3zSahJUB0NNGTNlpwlTczlCITAQSEQIADAUCQQ4KhAWDBpaaCAAKCRA5
yiv0PWqKX/zdAJ4hNn3AijtcAyMLrLhlZQvib551mwCgw6FEhGLjZ+as0W681luc
wZ6PzW+ITAQSEQIADAUCQoClNAWDBSP/WAAKCRAEDcCFfIOfqOMkAJwPUDhS1eTz
gnXclDKgf353LbjvXgCeLCWyyj/2d0gIk6SqzaPl2UcWrqiITAQTEQIADAUCPk1N
hAWDCVdXCAAKCRAtu3a/rdTJMwUMAKCVPkbk1Up/kyPrlsVKU/Nv3bOTZACfW5za
HX38jDCuxsjIr/084n4kw/uITAQTEQIADAUCQdeAdgWDBc0kFgAKCRBm79vIzYL9
Pj+8AJ9d7rvGJIcHzTCSYVnaStv6jP+AEACeNHa5yltqieRBCCcLcacGqYK81omI
TAQTEQIADAUCQhiBDgWDBYwjfgAKCRB2wQMcojFuoaDuAJ9CLYdysef7IsW42UfW
hI6HjxkzSgCfeEpXS4hEmmGicdpRiJQ/W21aB0GIZQQTEQIAHQULBwoDBAMVAwID
FgIBAheABQJLcC/KBQkQ8/OnABIHZUdQRwABAQkQjHGNO1By4fWw2wCeJilgEarL
8eEyfDdYTyRdqE45HkoAnjFSZY8Zg/iXeErHI0r04BRukNVgiHsEMBECADsFAkJ3
NfU0HQBPb3BzLi4uIHNob3VsZCBoYXZlIGJlZW4gbG9jYWwhIEknbSAqc28qIHN0
dXBpZC4uLgAKCRA5yiv0PWqKX+9HAJ0WjTx/rqgouK4QCrOV/2IOU+jMQQCfYSC8
JgsIIeN8aiyuStTdYrk0VWCIjwQwEQIATwUCRW8Av0gdAFNob3VsZCBoYXZlIGJl
ZW4gYSBsb2NhbCBzaWduYXR1cmUsIG9yIHNvbWV0aGluZyAtIFdURiB3YXMgSSB0
aGlua2luZz8ACgkQOcor9D1qil+g+wCfcFWoo5qUl4XTE9K8tH3Q+xGWeYYAnjii
KxjtOXc0ls+BlqXxbfZ9uqBsiQIiBBABAgAMBQJBgcuFBYMGItkHAAoJEKrj5s5m
oURoqC8QAIISudocbJRhrTAROOPoMsReyp46Jdp3iL1oFDGcPfkZSBwWh8L+cJjh
dycIwwSeZ1D2h9S5Tc4EnoE0khsS6wBpuAuih5s//coRqIIiLKEdhTmNqulkCH5m
imCzc5zXWZDW0hpLr2InGsZMuh2QCwAkB4RTBM+r18cUXMLV4YHKyjIVaDhsiPP/
MKUj6rJNsUDmDq1GiJdOjySjtCFjYADlQYSD7zcd1vpqQLThnZBESvEoCqumEfOP
xemNU6xAB0CL+pUpB40pE6Un6Krr5h6yZxYZ/N5vzt0Y3B5UUMkgYDSpjbulNvaU
TFiOxEU3gJvXc1+h0BsxM7FwBZnuMA8LEA+UdQb76YcyuFBcROhmcEUTiducLu84
E2BZ2NSBdymRQKSinhvXsEWlH6Txm1gtJLynYsvPi4B4JxKbb+awnFPusL8W+gfz
jbygeKdyqzYgKj3M79R3geaY7Q75Kxl1UogiOKcbI5VZvg47OQCWeeERnejqEAdx
EQiwGA/ARhVOP/1l0LQA7jg2P1xTtrBqqC2ufDB+v+jhXaCXxstKSW1lTbv/b0d6
454UaOUV7RisN39pE2zFvJvY7bwfiwbUJVmYLm4rWJAEOJLIDtDRtt2h8JahDObm
3CWkpadjw57S5v1c/mn+xV9yTgVx5YUfC/788L1HNKXfeVDq8zbAiQIiBBMBAgAM
BQJCnwocBYMFBZpwAAoJENjCCglaJFfPIT4P/25zvPp8ixqV85igs3rRqMBtBsj+
5EoEW6DJnlGhoi26yf1nasC2frVasWG7i4JIm0U3WfLZERGDjR/nqlOCEqsP5gS3
43N7r4UpDkBsYh0WxH/ZtST5llFK3zd7XgtxvqKL98l/OSgijH2W2SJ9DGpjtO+T
iegq7igtJzw7Vax9z/LQH2xhRQKZR9yernwMSYaJ72i9SyWbK3k0+e95fGnlR5pF
zlGq320rYHgD7v9yoQ2t1klsAxK6e3b7Z+RiJG6cAU8o8F0kGxjWzF4v8D1op7S+
IoRdB0Bap01ko0KLyt3+g4/33/2UxsW50BtfqcvYNJvU4bZns1YSqAgDOOanBhg8
Ip5XPlDxH6J/3997n5JNj/nk5ojfd8nYfe/5TjflWNiput6tZ7frEki1wl6pTNbv
V9C1eLUJMSXfDZyHtUXmiP9DKNpsucCUeBKWRKLqnsHLkLYydsIeUJ8+ciKc+EWh
FxEY+Ml72cXAaz5BuW9L8KHNzZZfez/ZJabiARQpFfjOwAnmhzJ9r++TEKRLEr96
taUI9/8nVPvT6LnBpcM38Td6dJ639YvuH3ilAqmPPw50YvglIEe4BUYD5r52Seqc
8XQowouGOuBX4vs7zgWFuYA/s9ebfGaIw+uJd/56Xl9ll6q5CghqB/yt1EceFEnF
CAjQc2SeRo6qzx22iEYEEBECAAYFAkSAbycACgkQCywYeUxD5vWDcACfQsVk/XGi
ITFyFVQ3IR/3Wt7zqBMAoNhso/cX8VUfs2BzxPvvGS3y+5Q9iEYEEBECAAYFAkUw
ntcACgkQOI4l6LNBlYkyFgCbBcw5gIii0RTDJsdNiuJDcu/NPqEAniSq9iTaLjgF
HZbaizUU8arsVCB5iEYEEBECAAYFAkWho2sACgkQu9u2hBuwKr6bjwCfa7ZK6O+X
mT08Sysg4DEoZnK4L9UAoLWgHuYg35wbZYx+ZUTh98diGU/miF0EExECAB0FAj4+
owwFCQlmAYAFCwcKAwQDFQMCAxYCAQIXgAAKCRCMcY07UHLh9XGOAJ4pVME15/DG
rUDohtGv2z8a7yv4AgCeKIp0jWUWE525QocBWms7ezxd6syIXQQTEQIAHQUCR6yU
zwUJDTBYqAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQcuH1dCoAoLC6RtsD9K3N
7NOxcp3PYOzH2oqzAKCFHn0jSqxk7E8by3sh+Ay8yVv0BYhdBBMRAgAdBQsHCgME
AxUDAgMWAgECF4AFAkequSEFCQ0ufRUACgkQjHGNO1By4fUdtwCfRNcueXikBMy7
tE2BbfwEyTLBTFAAnifQGbkmcARVS7nqauGhe1ED/vdgiF0EExECAB0FCwcKAwQD
FQMCAxYCAQIXgAUCS3AuZQUJEPPyWQAKCRCMcY07UHLh9aA+AKCHDkOBKBrGb8tO
g9BIub3LFhMvHQCeIOOot1hHHUlsTIXAUrD8+ubIeZaJARwEEgECAAYFAkvCIgMA
CgkQ3PTrHsNvDi8eQgf/dSx0R9Klozz8iK79w00NOsdoJY0Na0NTFmTbqHg30XJo
G62cXYgc3+TJnd+pYhYi5gyBixF/L8k/kPVPzX9W0YfwChZDsfTw0iDVmGxOswiN
jzSo0lhWq86/nEL30Khl9AhCC1XFNRw8WZYq9Z1qUXHHJ2rDARaedvpKHOjzRY0N
dx6R2zNyHDx2mlfCQ9wDchWEuJdAv0uHrQ0HV9+xq7lW/Q3L/V5AuU0tiowyAbBL
PPYrB6x9vt2ZcXS7BOy8SfQ1i8W2QDQ/Toork4YwBiv6WCW/ociy7paAoPOWV/Nf
2S6hDispeecbk7wqpbUj5klDmwrlgB/jmoAXWEnbsYkBIgQQAQIADAUCSSpooAUD
ABJ1AAAKCRCXELibyletfFOMCACpP+OVZ7lH/cNY+373c4FnSI0/S5PXS0ABgdd4
BFWRFWKrWBeXBGc8sZfHOzVEwkzV96iyHbpddeAOAkEA4OVPW1MMFCmlHxi2s9/N
JrSrTPVfQOH5fR9hn7Hbpq/ETw0IoX1FKo7vndMnHZnFEnI+PDXLcdMYQgljYzhT
xER4vYY0UKu8ekSshUy4zOX7XSJxwqPUvps8qs/TvojIF+vDJvgFYHVkgvS+shp8
Oh/exg9vKETBlgU87Jgsqn/SN2LrR/Jhl0aLd0G0iQ+/wHmVYdQUMFaCZwk/BKNa
XPzmGZEUZ3RNbYa19Mo7hcE3js76nh5YMxFvxbTggVu4kdFkiQEiBBABAgAMBQJK
M06IBQMAEnUAAAoJEJcQuJvKV618F4gH/innejIHffGMk8jYix4ZZT7pW6ApyoI+
N9Iy85H4L+8rVQrtcTHyq0VkcN3wPSwtfZszUF/0qP6P8sLJNJ1BtrHxLORYjJPm
gveeyHPzA2oJl6imqWUTiW822fyjY/azwhvZFzxmvbFJ+r5N/Z57+Ia4t9LTSqTN
HzMUYaXKDaAqzZeK7P0E6XUaaeygbjWjBLQ1O0ezozAy+Kk/gXApmDCGFuHSFe7Z
mgtFcbXLM2XFQpMUooETD2R8MUsd+xnQsff/k6pQOLxi+jUEsWSr/iqmvlk6gZ4D
pemBjuhcXYlxJYjUaX9Zmn5s+ofF4GFxRqXoY7l9Z+tCM9AX37lm6S+JASIEEAEC
AAwFAkpEcgoFAwASdQAACgkQlxC4m8pXrXz2mgf/RQkpmMM+5r8znx2TpRAGHi5w
ktvdFxlvPaOBWE28NDwTrpcoMqo9kzAiuvEQjVNihbP21wR3kvnQ84rTAH0mlC2I
uyybggpqwzOUl+Wi0o+vk8ZA0A0dStWRN8uqneCsd1XnqDe1rvqC4/9yY223tLmA
kPvz54ka2vX9GdJ3kxMWewhrVQSLCktQpygU0dujGTDqJtnk0WcBhVF9T87lv3W2
eGdPielzHU5trXezmGFj21d56G5ZFK8co7RrTt4qdznt80glh1BTGmhLlzjMPLTe
dcMusm3D1QB9ITogcG94ghSf9tEKmmRJ6OnnWM5Kn9KcL63E5oj2/lY9H54wSYkB
IgQQAQIADAUCSlY+RwUDABJ1AAAKCRCXELibyletfOOQB/0dyJBiBjgf+8d3yNID
pDktLhZYw8crIjPBVdOgX12xaUYBTGcQITRVHSggzffDA5BQXeUuWhpL4QB0uz1c
EPPwSMiWiXlBtwF5q6RVf3PZGJ9fmFuTkPRO7SruZeVDo9WP8HjbQtOLukYf566e
grzAYR9p74UgWftpDtmrqrRTobiuvsFBxosbeRCvEQCrN0n+p5D9hCVB88tUPHnO
WA4mlduAFZDxQWTApKQ92frHiBqy+M1JFezz2OM3fYN+Dqo/Cb7ZwOAA/2dbwS7o
y4sXEHbfWonjskgPQwFYB23tsFUuM4uZwVEbJg+bveglDsDStbDlfgArXSL/0+ak
lFcHiQEiBBABAgAMBQJKaAqEBQMAEnUAAAoJEJcQuJvKV618rH0H/iCciD4U6YZN
JBj0GN7/Xt851t9FWocmcaC+qtuXnkFhplXkxZVOCU4VBMs4GBoqfIvagbBTyfV4
Di+W8Uxr+/1jiu3l/HvoFxwdwNkGG6zNBhWSjdwQpGwPvh5ryV1OfLX/mgQgdDmx
vqz5+kFDUj4m7uLaeuU2j1T0lR4zU0yAsbt7J3hwfqJCXHOc9bm5nvJwMrSm+sdC
TP5HjUlwHr9mTe8xuZvj6sO/w0P4AqIMxjC9W7pT9q0ofG2KSTwt7wFbh05sbG4U
QYOJe4+Soh3+KjAa1c0cvmIh4cKX9qfCWwhhdeNfh1A9VTHhnl5zTv/UjvnQtjhl
H/Fq1eBSKcSJASIEEAECAAwFAkp5LgoFAwASdQAACgkQlxC4m8pXrXwY6wgAg3f8
76L3qDZTYlFAWs3pXBl8GsUr1DEkTlEDZMZKDM3wPmhaWBR1hMA3y6p3aaCUyJIJ
BEneXzgyU9uqCxXpC78d5qc3xs/Jd/SswzNYuvuzLYOw5wN5L31SLmQTQ8KqE0uo
RynBmtDCQ4M2UKifSnv+0+3mPh85LVAS481GNpL+VVfCYtKesWNu40+98Yg6L9NG
WwRTfsQbcdokZo44Jz7Y7f81ObC4r/X1DgPj2+d4AU/plzDcdrbINOyprs+7340e
cnaGO4Lsgd19b1CvcgJgltRquu3kRvd+Ero2RYpDv6GVK8Ea0Lto4+b/Ae8cLXAh
QnaWQCEWmw+AU4Jbz4kBIgQQAQIADAUCSo5fvQUDABJ1AAAKCRCXELibyletfA08
B/9w8yJdc8K+k07U30wR/RUg3Yb2lBDygmy091mVsyB0RGixBDXEPOXBqGKAXiV1
QSMAXM2VKRsuKahY2HFkPbyhZtjbdTa7Pr/bSnPvRhAh9GNWvvRg2Kp3qXDdjv9x
ywEghKVxcEIVXtNRvpbqRoKmHzIExvUQck5DM1VwfREeYIoxgs4035WADhVMdngQ
S2Gt8P2WaU/p8EZhFGg6X8KtOlD68zGboaJe0hj2VDc+Jc+KdjRfE3fW5IToid/o
DkUaIW6tB3WkXb0g6D/2hrEJbX3headChHKSB8eQdOR9bcCJDhhU8csd501qmrhC
ctmvlpeWQZdIQdk6sABPWeeCiQEiBBABAgAMBQJKoBJHBQMAEnUAAAoJEJcQuJvK
V618Ml8H/1D88/g/p9fSVor4Wu5WlMbg8zEAik3BIxQruEFWda6nART6M9E7e+P1
++UHZsWYs6l9ROpWxRLG1Yy9jLec2Y3nUtb20m65p+IVeKR2a9PHW35WZDV9dOYP
GZabKkO1clLeWLVgp9LRjZ+AeRG+ljHqsULXro1dwewLTB/gg9I2vgNv6dKxyKak
nM/GrqZLATAq2KoaE/u/6lzRFZIzZnLtjZh8X7+nS+V8v9IiY4ntrpkrbvFk30U6
WJp79oBIWwnW/84RbxutRoEwSar/TLwVRkcZyRXeJTapbnLGnQ/lDO1o1d7+Vbjd
q/Sg/cKHHf7NthCwkQNsCnHL0f51gZCJASIEEAECAAwFAkqoEAAFAwASdQAACgkQ
lxC4m8pXrXwE/Af/XD4R/A5R6Ir/nCvKwCTKJmalajssuAcLEa2pMnFZYO/8rzLO
+Gp8p0qFH9C4LFwA0NvR5q6X/swuROf4zxljSvNcdlQVaAfJ2ZDEgJ5GXzsPplrv
SAI9jS3LL7fSWDZgKuUe0a4qx7A0NgyGMUYGhP+QlRFa8vWEBI9fANd/0mMqAeBV
qQyOH0X1FiW1Ca2Jn4NKfuMy9GEvRddVIbB1LvoNVtXPNzeeKMyNb9Jdx1MFWssy
COBP2DayJKTmjvqPEc/YOjOowoN5sJ/jn4mVSTvvlTooLiReSs6GSCAjMVxN7eYS
/Oyq6Iu1JDcJvmB8N2WixAZtAVgF8OA7CWXKVYkBIgQQAQIADAUCSrnHiQUDABJ1
AAAKCRCXELibyletfPChB/9uECti1dZeNuFsd0/RuGyRUVlrrhJE6WCcOrLO9par
rPbewbKBmjSzB0MygJXGvcC06mPNuquJ7/WpxKsFmfg4vJBPlADFKtgRUy9BLzjC
eotWchPHFBVW9ftPbaQViSUu7d89NLjDDM5xrh80puDIApxoQLDoIrh3T1kpZx56
jSWv0gelFUMbXAzmqkJSyL4Xdh1aqzgUbREd7Xf2ICzuh0sV6V7c/AwWtjWEGEsA
HZaiQDywZwbC18GwrMLiAzGWb/AScFDQRCZKJDjL+Ql8YT6z+ZMVr8gb7CIU5PKY
dhiIf2UVTQwLAoW7lNRCQQAqcGjK3IMIz7SO/yk4HmVUiQEiBBABAgAMBQJK3gjG
BQMAEnUAAAoJEJcQuJvKV618jkEH+wb0Zv9z7xQgpLMowVuBFQVu8/z7P5ASumyB
PUO3+0JVxSHBhlCKQK7n11m1fhuGt2fCxXhSU6LzXj36rsKRY53lGZ9QhvqFUtQH
3Xb2IQLIJC4UKjG2jSSCdcuA/x98bwp2v7O03rn7ndCS16CwXnRV3geQoNipRKMS
DajKPpZv1RiZm8pMKqEb8WSw352xWoOcxuffjlsOEwvJ85SEGCAZ9tmIlkZOc7Ai
QONDvii9b8AYhQ60RIQC0HP2ASSmK0V92VeFPxHmAygdDQgZNVtbVxgnnt7oTNEu
VRXNY+z4OfBArp7R+cTsvijDRZY4kML1n22hUybwoxUEvjqZV2+JASIEEAECAAwF
AkrvOlQFAwASdQAACgkQlxC4m8pXrXxrPAgArXiNgZirNuBhfNCXlkzkCHLx5wnV
e4SmTpbWzTwWw7+qk7d4l9hlWtdImISORINzo7f4ShSUzJX2GciNaXhaHRo7+y5O
Zbu82jQb09aQQj/nibKYuqxqUrobTEm+DuYz3JUQZm2PsPcHLS8mX9cxvrJUncPG
nXEV0DRaq71SGWDprtkvBbp6i38aY3sIhYgz8wM5m1szKDtjywmBYcFehIdozt9z
hm7wZshzRWQX1+Rf/pIsnk+OzBIa34crSemTnacbV/B7278z2XAyziPNFuqz0xu+
iltOmYmayfNWAmumuw9NcuwWMlth6Mc2HLrpo0ZBheJ6iuDMPsHnwqdB/4kBIgQQ
AQIADAUCSwBd2gUDABJ1AAAKCRCXELibyletfP6tB/4m1w0BtlkJgtS6E+B/ns14
z4A4PGors+n+MYm05qzvi+EnDF/sytCmVcKeimrtvDcfoDtKAFFvJjcYXfnJdGWm
Pu0SJMRL5KKCirAKwZmU/saxOgoB5QLNw+DHPteJ3w9GmWlGxIqG1r15WC5duzBC
y3FsnjJYG3jaLnHOO9yXXb5h0kUTORfUKdvAr1gxF2KoatZWqGoaPPnHoqb88rjt
zk8I7gDqoXnzh8wLxa0ZYvfTC/McxdWTrwXLft+krmMQ18iIZEne2hvVLNJVuluU
oiWLeHA8iNCQ4W4WTdLc1mCnCjGTMX/MN41uLH0C9Ka4R6wEaqj4lPDk1B/1TV+Q
iQEiBBABAgAMBQJLEYGrBQMAEnUAAAoJEJcQuJvKV618naIH/2t9aH5mBTKBN6fU
qhrf79vIsjtI/QNS5qisBISZMX3/1/0Gu6WnxkPSfdCUJMWCjMcnVj7KU2wxTHHG
VpAStd9r2afUNxRyqZwzwyytktuZok0XngAEDYDDBS3ssu2R4uWLCsC2ysXEqO/5
tI5YrTWJZrfeIphTaYP5hxrMujvqy3kEwKKbiMz91cDeiLS+YCBcalj5n/1dMYf7
8U8C6ieurxAg/L8h6x25VM4Ilx4MmG2T8QGtkkUXd+Fd/KYWmf0LE5LLPknf0Hhw
oVslPXeinp4FsHK/5wzviv4YZpzuTqs9NlKcMsa4IuuPOB0FDf0pn+OFQbEg9QwY
2gCozK+JASIEEAECAAwFAksjTdQFAwASdQAACgkQlxC4m8pXrXwlogf/XBGbXRVX
LMaRN4SczOjwT3/tUCriTkb3v+zKjRG90zFhYAccjn7w+7jKQicjq6quQG1EH2X4
/Su6ps1lDLqGHHhiJW3ZhxQScLZmhdAYsh2qG4GP/UW3QjXG7c61t+H3olvWg2cr
wqCxxFZAgkAAkr9xcHWFZJEQeXoob6cCZObaUnHSANdmC6s5lUxXYa2bmL7Q3UB4
4KCzDvAfbPZKJOw9k0qb3lc11zx+vGdyZFbm4R0+3LPp/vT0b3GlSbbF9lU1GOXh
VaphrgFFa76dmjfHCkPplXAkK1VSIU/aPGAefduTFMdlSZpdMtJ5AULjGcszBDlR
pLlPxvqVa0ZpgIkBIgQQAQIADAUCSycmkgUDABJ1AAAKCRCXELibyletfHlNCACp
1YespiHfQt2alcscE5zgfETEHHic8Ai6pNkU9HT4TeWcFHEDe5QqfYcpjLrQvBXS
kSvxEittbyRdv+e+j5Z+HyHjiG8nAQBL6qy9eHqQE4+d7gYs6DTk7sG9ZMYphREb
ltzD+F4hVCQdLT8LNr0eVFN7ehqECScDaCG8/Qyti+l/0M902/Yn+mz0ilOiUdWJ
9x6LPaIINtb1gsYDEylLjwGIZmI0r5Kh9wYoV4vnNezFbxO1uRiW0B7iaPjIEsbt
OOKp7wx2aX+DM3N9F3BtaIY8XnzcnomNm83SNsgmgrZljpQltUnNqIhNM8DupQ+I
WOV5gtl6pTC7CgeVTVyRiQEiBBABAgAMBQJLOGXuBQMAEnUAAAoJEJcQuJvKV618
ll4IAKJ9mm4jb0c8fe9+uDI8eCJRbzNbVXm8zWzpA8GUtQAakwxoKv332QP1Wa1P
odni/e3EMhsSREOZJJv79YqGxGRBTE9Kb/VjM34nas4XSnXKW28XWhKyIw+XwQAi
nY2swFHh+83Htr/mwTdJfS2aEYl2zboBvd/JZCdhOGU2GH737S/3uEczoKkfVQ/w
OTM8X1xWwlYWqx23k/DsGcuDs9lA2g7Mx7DSqBtVjaTkn9h0zATzXLDkmP4SAUVj
cZ83WDpFre5WnizZjdXlBMM5OCexp5WpmzyHLTnaBFK4jEmnsk5C2Rnoyp8Ivz6g
Ecg1tRbEXijRw++d2TFYlJwLKtiJASIEEAECAAwFAktKMicFAwASdQAACgkQlxC4
m8pXrXxqHQgAuYY5scKrh0m/GS9EYnyC9494lOlO6iytU0CpE6oBC31M3hfX/Dbj
UbcS5szZNU+2CPYo4ujQLZ7suN7+tTjG6pZFfMevajT9+jsL+NPMF8RLdLOVYmbl
TmSQGNO+XGEYaKYH5oZIeIW5AKCgi2ozkdFlBBLAx7Kqo/FyybhkURFEcvEyVmgf
3KLV7IIiX/fYLfoCMCJ/Lcm9/llSFB1n8Nvg66Xd533DKoHjueD3jyaNAVlo2mq/
sIAv++kntvOiB3GDK5pfwHZ78WWiCpsWZpE5gzAnzJ1Y0WEigRo0PVLu3cLO0jLG
23d+H/CbfZ8rkajHJeCDQF7YVmP0t0nYpYkBIgQQAQIADAUCS1v+ZgUDABJ1AAAK
CRCXELibyletfNS/CACqt2TkB86mjqM+cJ74+dWBvJ2aFuURuxzm95i9Q/W/hU08
2iMbC3+0k2oD8CrTOe61P+3oRyLjv/UEDUNzLncNe2YsA9JeV+4hvPwH5Vp3Om13
089fCKZUbqslXNKkHiWYU+zAaZJXEuGRmRz0HbQIeAMOWF4oa226uo1e4ws1Jhc+
F3E/ApCRyFBqBUdL05hapQLditYpsBjIdiBGpjzidMLE2wX2W4ZpAdN0U6BIyIqR
mTPjbSkvzS9kSWFmfhQgnBDKEYJpVZgE1sN52rYC1sDeGeiuKxlzjVov9MMhYMWa
Zo3R5o3F2iIM/BK6FbC252lf/Mhu3ICuXujNBZNYiQEiBBABAgAMBQJLbSH4BQMA
EnUAAAoJEJcQuJvKV618kd0IAJLLwDH6gvgAlBFklQJXqQxUdcSOOVMAWtlHgWOy
ozjgomZZBkRL8dtCDr9YBMcj5czcQ3qpmLJdppXhKB+kJV2iUXfDMSFXwJ4wLfIs
8FNnXw8H5U01oBkGH/Ku6ngL9Vwt+MjYHtCWkw9QueUKZnDudX9qIzLAIt+mwSTu
A6+fY4VWIg40AA0v3exaQM55YR/UhlKunpGG9o8Qkq77dMEbTMpOmBoLbOMRB3Dd
MAvVU6G2l6Pcb7KobVCuOBnb6batXARV/G8sw+nzfJ16fr/KobZT2A6m+Jrqk4dl
F14ljLbz16O5JGUPAryN2G2ddBdSAy7dtFSVhWWiWC9n88q5Ag0EPj6jHRAIAO/h
iX8WzHWOMLJT54x/axeDdqn1rBDf5cWmaCWHN2ujNNlgpx5emoU9v7QStsNUCOGB
bXkeO4Ar7YG+jtSR33zqNh3y5kQ0YkY3dQ0wh6nsl+wh4XIIY/3TUZVtmdJeUBRH
JlfVNFYad2hX1guFI37Ny1PoZAFsxO82g+XB/Se8r/+sbmVcONdcdIeFKrE3FjLt
IjNQcxC6l9Q2Oy8KDxG/zvUZG3+H5i3tdRMyGgmuD6gEV0GXOHYUopzLeit1+Aa0
bCk36Mwbu+BeOw/CJW3+b0mB27hOaf9aCA855IP6fJFvtxcblq8nHIqhU3Dc9tec
sl9/S1xZ5S8ylG/xeRsAAwUH/i8KqmvAhq0X7DgCcYputwh37cuZlHOa1Ep07JRm
BCDgkdQXkGrsj2Wzw7Aw/TGdWWkmn2pxb8BRui5cfcZFO7c6vryi6FpJuLucX975
+eVY50ndWkPXkJ1HF4i+HJwRqE2zliN/RHMs4LJcwXQvvjD43EE3AO6eiVFbD+qA
AdxUFoOeLblKNBHPG7DPG9xL+Ni5rkE+TXShxsB7F0z7ZdJJZOG0JODmox7IstQT
GoaU9u41oyZTIiXPiFidJoIZCh7fdurP8pn3X+R5HUNXMr7M+ba8lSNxce/F3kmH
0L7rsKqdh9d/aVxhJINJ+inVDnrXWVoXu9GBjT8Nco1iU9SIVAQYEQIADAUCTnc9
7QUJE/sBuAASB2VHUEcAAQEJEIxxjTtQcuH1FJsAmwWK9vmwRJ/y9gTnJ8PWf0BV
roUTAKClYAhZuX2nUNwH4vlEJQHDqYa5yQ==
=ghXk
-----END PGP PUBLIC KEY BLOCK-----</pre><p>
        To import the build key into your personal public GPG keyring,
        use <span class="command"><strong>gpg --import</strong></span>. For example, if you have
        saved the key in a file named
        <code class="filename">mysql_pubkey.asc</code>, the import command looks
        like this:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gpg --import mysql_pubkey.asc</code></strong>
gpg: key 5072E1F5: public key "MySQL Release Engineering
&lt;mysql-build@oss.oracle.com&gt;" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: no ultimately trusted keys found
</pre><p>
        You can also download the key from the public keyserver using
        the public key id, <code class="literal">5072E1F5</code>:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; gpg --recv-keys 5072E1F5
gpg: requesting key 5072E1F5 from hkp server keys.gnupg.net
gpg: key 5072E1F5: "MySQL Release Engineering &lt;mysql-build@oss.oracle.com&gt;"
1 new user ID
gpg: key 5072E1F5: "MySQL Release Engineering &lt;mysql-build@oss.oracle.com&gt;"
53 new signatures
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:           new user IDs: 1
gpg:         new signatures: 53</pre><p>
        If you want to import the key into your RPM configuration to
        validate RPM install packages, you should be able to import the
        key directly:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpm --import mysql_pubkey.asc</code></strong>
</pre><p>
        If you experience problems or require RPM specific information,
        see <a class="xref" href="installing.html#checking-rpm-signature" title="2.1.3.4 Signature Checking Using RPM">Section 2.1.3.4, “Signature Checking Using RPM”</a>.
      </p><p>
        After you have downloaded and imported the public build key,
        download your desired MySQL package and the corresponding
        signature, which also is available from the download page. The
        signature file has the same name as the distribution file with
        an <code class="filename">.asc</code> extension, as shown by the examples
        in the following table.
</p>
<div class="table">
<a name="idm46444443940304"></a><p class="title"><b>Table 2.1 MySQL Package and Signature Files for Source files</b></p>
<div class="table-contents">
<table><col width="25%"><col width="75%"><thead><tr>
            <th scope="col">File Type</th>
            <th scope="col">File Name</th>
          </tr></thead><tbody><tr>
            <td scope="row">Distribution file</td>
            <td><code class="literal">mysql-standard-8.0.22-linux-i686.tar.gz</code></td>
          </tr><tr>
            <td scope="row">Signature file</td>
            <td><code class="literal">mysql-standard-8.0.22-linux-i686.tar.gz.asc</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
        Make sure that both files are stored in the same directory and
        then run the following command to verify the signature for the
        distribution file:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gpg --verify <em class="replaceable"><code>package_name</code></em>.asc</code></strong>
</pre><p>
        If the downloaded package is valid, you will see a "Good
        signature" similar to:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gpg --verify mysql-standard-8.0.22-linux-i686.tar.gz.asc</code></strong>
gpg: Signature made Tue 01 Feb 2011 02:38:30 AM CST using DSA key ID 5072E1F5
gpg: Good signature from "MySQL Release Engineering &lt;mysql-build@oss.oracle.com&gt;"
</pre><p>
        The <code class="literal">Good signature</code> message indicates that the
        file signature is valid, when compared to the signature listed
        on our site. But you might also see warnings, like so:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gpg --verify mysql-standard-8.0.22-linux-i686.tar.gz.asc</code></strong>
gpg: Signature made Wed 23 Jan 2013 02:25:45 AM PST using DSA key ID 5072E1F5
gpg: checking the trustdb
gpg: no ultimately trusted keys found
gpg: Good signature from "MySQL Release Engineering &lt;mysql-build@oss.oracle.com&gt;"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: A4A9 4068 76FC BD3C 4567  70C8 8C71 8D3B 5072 E1F5
</pre><p>
        That is normal, as they depend on your setup and configuration.
        Here are explanations for these warnings:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="emphasis"><em>gpg: no ultimately trusted keys found</em></span>:
            This means that the specific key is not "ultimately trusted"
            by you or your web of trust, which is okay for the purposes
            of verifying file signatures.
          </p></li><li class="listitem"><p>
            <span class="emphasis"><em>WARNING: This key is not certified with a trusted
            signature! There is no indication that the signature belongs
            to the owner.</em></span>: This refers to your level of trust
            in your belief that you possess our real public key. This is
            a personal decision. Ideally, a MySQL developer would hand
            you the key in person, but more commonly, you downloaded it.
            Was the download tampered with? Probably not, but this
            decision is up to you. Setting up a web of trust is one
            method for trusting them.
</p></li></ul>
</div>
<p>
        See the GPG documentation for more information on how to work
        with public keys.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="checking-gpg-signature-windows"></a>2.1.3.3 Signature Checking Using Gpg4win for Windows</h4>

</div>

</div>

</div>
<p>
        The <a class="xref" href="installing.html#checking-gpg-signature" title="2.1.3.2 Signature Checking Using GnuPG">Section 2.1.3.2, “Signature Checking Using GnuPG”</a> section describes
        how to verify MySQL downloads using GPG. That guide also applies
        to Microsoft Windows, but another option is to use a GUI tool
        like <a class="ulink" href="http://www.gpg4win.org/" target="_top">Gpg4win</a>. You
        may use a different tool but our examples are based on Gpg4win,
        and utilize its bundled <code class="literal">Kleopatra</code> GUI.
      </p><p>
        Download and install Gpg4win, and then load Kleopatra. The
        dialog should look similar to:
</p>
<div class="figure">
<a name="gnupg-kleopatra-home"></a><p class="title"><b>Figure 2.1 Kleopatra: Initial Screen</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/gnupg-kleopatra-home.png" width="682" height="436" alt='Shows the default Kleopatra screen. The top menu includes "File", "View", "Certificates", "Tools", "Settings", "Window", and "Help.". Underneath the top menu is a horizontal action bar with available buttons to "Import Certificates", "Redisplay", and "Lookup Certificates on Server". Greyed out buttons are "Export Certificates" and "Stop Operation". Underneath is a search box titled "Find". Underneath that are three tabs: "My Certificates", "Trusted Certificates", and "Other Certificates" with the "My Certificates" tab selected. "My Certificates" contains six columns: "Name", "E-Mail", "Valid From", "Valid Until", "Details", and "Key-ID". There are no example values.'>
</div>

</div>

</div>
<br class="figure-break"><p>
        Next, add the MySQL Release Engineering certificate. Do this by
        clicking <span class="guimenu">File</span>, <span class="guimenu">Lookup Certificates
        on Server</span>. Type "Mysql Release Engineering" into the
        search box and press <span class="guibutton">Search</span>.
</p>
<div class="figure">
<a name="gnupg-kleopatra-find-certificate"></a><p class="title"><b>Figure 2.2 Kleopatra: Lookup Certificates on Server Wizard: Finding a Certificate</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/gnupg-kleopatra-find-certificate.png" width="854" height="330" alt='Shows a search input field titled "Find" with "mysql release engineering" entered. The one result contains the following values: Name=MySQL Release Engineering, E-Mail=mysql-build@oss.oracle.com, Valid From=2003-02-03, Valid Until="", Details=OpenPGP, Fingerprint=5072E1F5, and Key-ID=5072E1F5. Available action buttons are: Search, Select All, Deselect All, Details, Import, and Close.'>
</div>

</div>

</div>
<br class="figure-break"><p>
        Select the "MySQL Release Engineering" certificate. The
        Fingerprint and Key-ID must be "5072E1F5", or choose
        <span class="guibutton">Details...</span> to confirm the certificate is
        valid. Now, import it by clicking <span class="guibutton">Import</span>.
        An import dialog will be displayed, choose
        <span class="guibutton">Okay</span>, and this certificate will now be
        listed under the <span class="guilabel">Imported Certificates</span> tab.
      </p><p>
        Next, configure the trust level for our certificate. Select our
        certificate, then from the main menu select
        <span class="guimenu">Certificates</span>, <span class="guimenu">Change Owner
        Trust...</span>. We suggest choosing <span class="guilabel">I believe
        checks are very accurate</span> for our certificate, as
        otherwise you might not be able to verify our signature. Select
        <span class="guilabel">I believe checks are very accurate</span> to
        enable "full trust" and then press <span class="guibutton">OK</span>.
</p>
<div class="figure">
<a name="gnupg-kleopatra-change-trust"></a><p class="title"><b>Figure 2.3 Kleopatra: Change Trust level for MySQL Release Engineering</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/gnupg-kleopatra-change-trust.png" width="656" height="472" alt="A list of trust options are displayed, the options include &quot;I don't know (unknown trust)&quot;, &quot;I do NOT trust them (never trust)&quot;, &quot;I believe checks are casual (marginal trust)&quot;, &quot;I believe checks are very accurate (full trust)&quot;, and &quot;This is my certificate (ultimate trust)&quot;. The &quot;I believe checks are very accurate (full trust)&quot; option is selected.">
</div>

</div>

</div>
<br class="figure-break"><p>
        Next, verify the downloaded MySQL package file. This requires
        files for both the packaged file, and the signature. The
        signature file must have the same name as the packaged file but
        with an appended <code class="filename">.asc</code> extension, as shown
        by the example in the following table. The signature is linked
        to on the downloads page for each MySQL product. You must create
        the <code class="literal">.asc</code> file with this signature.
</p>
<div class="table">
<a name="idm46444443873440"></a><p class="title"><b>Table 2.2 MySQL Package and Signature Files for MySQL Installer for Microsoft
Windows</b></p>
<div class="table-contents">
<table><col width="25%"><col width="75%"><thead><tr>
            <th scope="col">File Type</th>
            <th scope="col">File Name</th>
          </tr></thead><tbody><tr>
            <td scope="row">Distribution file</td>
            <td><code class="literal">mysql-installer-community-8.0.22.msi</code></td>
          </tr><tr>
            <td scope="row">Signature file</td>
            <td><code class="literal">mysql-installer-community-8.0.22.msi.asc</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
        Make sure that both files are stored in the same directory and
        then run the following command to verify the signature for the
        distribution file. Either drag and drop the signature
        (<code class="filename">.asc</code>) file into Kleopatra, or load the
        dialog from <span class="guimenu">File</span>, <span class="guimenuitem">Decrypt/Verify
        Files...</span>, and then choose either the
        <code class="filename">.msi</code> or <code class="filename">.asc</code> file.
</p>
<div class="figure">
<a name="gnupg-kleopatra-decrypt-load"></a><p class="title"><b>Figure 2.4 Kleopatra: The Decrypt and Verify Files Dialog</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/gnupg-kleopatra-decrypt-load.png" width="576" height="425" alt="Shows available decrypt and verify options to perform. A MySQL Installer MSI file is used in the example where the .asc file is listed as &quot;Input file&quot; and the .msi file is listed under &quot;Signed Data&quot;. The &quot;Input file is detached signature&quot; option's checkbox is checked. A &quot;Input file is an archive; unpack with:&quot; option is shown but greyed out. Below is the &quot;Create all output files in a single folder&quot; option checkbox that is checked, and an &quot;Output folder&quot; input field with &quot;C:/docs&quot; entered as an example. The available buttons are &quot;Back&quot; (greyed out), &quot;Decrypt/Verify&quot;, and &quot;Cancel.&quot;">
</div>

</div>

</div>
<br class="figure-break"><p>
        Click <span class="guibutton">Decrypt/Verify</span> to check the file.
        The two most common results will look like the following, and
        although the yellow warning looks problematic, the following
        means that the file check passed with success. You may now run
        this installer.
</p>
<div class="figure">
<a name="gnupg-kleopatra-decrypt-okay-sig"></a><p class="title"><b>Figure 2.5 Kleopatra: the Decrypt and Verify Results Dialog: All operations
completed</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/gnupg-kleopatra-decrypt-okay-sig.png" width="576" height="424" alt="Yellow portion of the results window shows &quot;Not enough information to check signature validity&quot; and &quot;The validity of the signature cannot be verified.&quot; Also shown is key information, such as the KeyID and email address, the key's sign on date, and also displays the name of the ASC file..">
</div>

</div>

</div>
<br class="figure-break"><p>
        Seeing a red "The signature is bad" error means the file is
        invalid. Do not execute the MSI file if you see this error.
</p>
<div class="figure">
<a name="gnupg-kleopatra-decrypt-invalid-sig"></a><p class="title"><b>Figure 2.6 Kleopatra: the Decrypt and Verify Results Dialog: Bad</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/gnupg-kleopatra-decrypt-invalid-sig.png" width="656" height="518" alt='Red portion of the results window shows "Invalid signature", "Signed with unknown certificate", "The signature is bad", and also displays the name of the ASC file.'>
</div>

</div>

</div>
<br class="figure-break"><p>
        The <a class="xref" href="installing.html#checking-gpg-signature" title="2.1.3.2 Signature Checking Using GnuPG">Section 2.1.3.2, “Signature Checking Using GnuPG”</a> section explains
        why you probably don't see a green <code class="literal">Good
        signature</code> result.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="checking-rpm-signature"></a>2.1.3.4 Signature Checking Using RPM</h4>

</div>

</div>

</div>
<p>
        For RPM packages, there is no separate signature. RPM packages
        have a built-in GPG signature and MD5 checksum. You can verify a
        package by running the following command:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpm --checksig <em class="replaceable"><code>package_name</code></em>.rpm</code></strong>
</pre><p>
        Example:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpm --checksig MySQL-server-8.0.22-0.linux_glibc2.5.i386.rpm</code></strong>
MySQL-server-8.0.22-0.linux_glibc2.5.i386.rpm: md5 gpg OK
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          If you are using RPM 4.1 and it complains about <code class="literal">(GPG)
          NOT OK (MISSING KEYS: GPG#5072e1f5)</code>, even though you
          have imported the MySQL public build key into your own GPG
          keyring, you need to import the key into the RPM keyring
          first. RPM 4.1 no longer uses your personal GPG keyring (or
          GPG itself). Rather, RPM maintains a separate keyring because
          it is a system-wide application and a user's GPG public
          keyring is a user-specific file. To import the MySQL public
          key into the RPM keyring, first obtain the key, then use
          <span class="command"><strong>rpm --import</strong></span> to import the key. For
          example:
</p>
</div>
<pre data-lang="terminal" class="programlisting">shell&gt; gpg --export -a 5072e1f5 &gt; 5072e1f5.asc
shell&gt; rpm --import 5072e1f5.asc</pre><p>
        Alternatively, <span class="command"><strong>rpm</strong></span> also supports loading the
        key directly from a URL, and you can use this manual page:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpm --import https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html</code></strong>
</pre><p>
        If you need to obtain the MySQL public key, see
        <a class="xref" href="installing.html#checking-gpg-signature" title="2.1.3.2 Signature Checking Using GnuPG">Section 2.1.3.2, “Signature Checking Using GnuPG”</a>.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="installation-layouts"></a>2.1.4 Installation Layouts</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444443815216"></a><a class="indexterm" name="idm46444443814144"></a><a class="indexterm" name="idm46444443813072"></a><a class="indexterm" name="idm46444443811584"></a><p>
      The installation layout differs for different installation types
      (for example, native packages, binary tarballs, and source
      tarballs), which can lead to confusion when managing different
      systems or using different installation sources. The individual
      layouts are given in the corresponding installation type or
      platform chapter, as described following. Note that the layout of
      installations from vendors other than Oracle may differ from these
      layouts.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <a class="xref" href="installing.html#windows-installation-layout" title="2.3.1 MySQL Installation Layout on Microsoft Windows">Section 2.3.1, “MySQL Installation Layout on Microsoft Windows”</a>
        </p></li><li class="listitem"><p>
          <a class="xref" href="installing.html#source-installation-layout" title="2.9.3 MySQL Layout for Source Installation">Section 2.9.3, “MySQL Layout for Source Installation”</a>
        </p></li><li class="listitem"><p>
          <a class="xref" href="installing.html#binary-installation-layout" title="Table 2.3 MySQL Installation Layout for Generic Unix/Linux Binary Package">Table 2.3, “MySQL Installation Layout for Generic Unix/Linux Binary Package”</a>
        </p></li><li class="listitem"><p>
          <a class="xref" href="installing.html#mysql-installation-layout-linuxrpm" title="Table 2.11 MySQL Installation Layout for Linux RPM Packages from the MySQL Developer Zone">Table 2.11, “MySQL Installation Layout for Linux RPM Packages from the MySQL
        Developer Zone”</a>
        </p></li><li class="listitem"><p>
          <a class="xref" href="installing.html#mysql-installation-layout-osx" title="Table 2.6 MySQL Installation Layout on macOS">Table 2.6, “MySQL Installation Layout on macOS”</a>
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="compiler-characteristics"></a>2.1.5 Compiler-Specific Build Characteristics</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444443800000"></a><p>
      In some cases, the compiler used to build MySQL affects the
      features available for use. The notes in this section apply for
      binary distributions provided by Oracle Corporation or that you
      compile yourself from source.
    </p><p>
      <span class="bold"><strong><span class="command"><strong>icc</strong></span> (Intel C++ Compiler)
      Builds</strong></span>
    </p><p>
      A server built with <span class="command"><strong>icc</strong></span> has these
      characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          SSL support is not included.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="binary-installation"></a>2.2 Installing MySQL on Unix/Linux Using Generic Binaries</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm46444443792576"></a><a class="indexterm" name="idm46444443791120"></a><p>
    Oracle provides a set of binary distributions of MySQL. These
    include generic binary distributions in the form of compressed
    <span class="command"><strong>tar</strong></span> files (files with a
    <code class="filename">.tar.xz</code> extension) for a number of platforms,
    and binaries in platform-specific package formats for selected
    platforms.
  </p><p>
    This section covers the installation of MySQL from a compressed
    <span class="command"><strong>tar</strong></span> file binary distribution on Unix/Linux
    platforms. For other platform-specific binary package formats, see
    the other platform-specific sections in this manual. For example,
    for Windows distributions, see
    <a class="xref" href="installing.html#windows-installation" title="2.3 Installing MySQL on Microsoft Windows">Section 2.3, “Installing MySQL on Microsoft Windows”</a>. See
    <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a> on how to obtain MySQL in different
    distribution formats.
  </p><p>
    MySQL compressed <span class="command"><strong>tar</strong></span> file binary distributions
    have names of the form
    <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>-<em class="replaceable"><code>OS</code></em>.tar.xz</code>,
    where <code class="literal"><em class="replaceable"><code>VERSION</code></em></code> is a
    number (for example, <code class="literal">8.0.22</code>), and
    <em class="replaceable"><code>OS</code></em> indicates the type of operating system
    for which the distribution is intended (for example,
    <code class="literal">pc-linux-i686</code> or <code class="literal">winx64</code>).
  </p><p>
    There is also a <span class="quote">“<span class="quote">minimal install</span>”</span> version of the MySQL
    compressed <span class="command"><strong>tar</strong></span> file for the Linux generic binary
    distribution, which has a name of the form
    <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>-<em class="replaceable"><code>OS</code></em>-minimal.tar.xz</code>.
    The minimal install distribution excludes debug binaries and is
    stripped of debug symbols, making it significantly smaller than the
    regular binary distribution. If you choose to install the minimal
    install distribution, remember to adjust for the difference in file
    name format in the instructions that follow.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warnings
</div>

<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          If you have previously installed MySQL using your operating
          system native package management system, such as Yum or APT,
          you may experience problems installing using a native binary.
          Make sure your previous MySQL installation has been removed
          entirely (using your package management system), and that any
          additional files, such as old versions of your data files,
          have also been removed. You should also check for
          configuration files such as <code class="filename">/etc/my.cnf</code>
          or the <code class="filename">/etc/mysql</code> directory and delete
          them.
        </p><p>
          For information about replacing third-party packages with
          official MySQL packages, see the related
          <a class="ulink" href="http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/" target="_top">APT
          guide</a> or <a class="ulink" href="https://dev.mysql.com/doc/refman/5.7/en/replace-third-party-yum.html" target="_top">Yum
          guide</a>.
        </p></li><li class="listitem"><p>
          MySQL has a dependency on the <code class="literal">libaio</code>
          library. Data directory initialization and subsequent server
          startup steps will fail if this library is not installed
          locally. If necessary, install it using the appropriate
          package manager. For example, on Yum-based systems:
        </p><a class="indexterm" name="idm46444443767520"></a><pre data-lang="terminal" class="programlisting">shell&gt; <em class="replaceable"><code>yum search libaio</code></em>  # search for info
shell&gt; <em class="replaceable"><code>yum install libaio</code></em> # install library
</pre><p>
          Or, on APT-based systems:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <em class="replaceable"><code>apt-cache search libaio</code></em> # search for info
shell&gt; <em class="replaceable"><code>apt-get install libaio1</code></em> # install library
</pre></li><li class="listitem"><p>
          <span class="bold"><strong>Oracle Linux 8 / Red Hat 8</strong></span>
          (EL8): These platforms by default do not install the file
          <code class="filename">/lib64/libtinfo.so.5</code>, which is required
          by the MySQL client <span class="command"><strong>bin/mysql</strong></span> for packages
          <code class="filename">mysql-VERSION-el7-x86_64.tar.gz</code> and
          <code class="filename">mysql-VERSION-linux-glibc2.12-x86_64.tar.xz</code>.
          To work around this issue, install the
          <code class="literal">ncurses-compat-libs</code> package:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <em class="replaceable"><code>yum install ncurses-compat-libs</code></em>
</pre></li></ul>
</div>

</div>
<p>
    To install a compressed <span class="command"><strong>tar</strong></span> file binary
    distribution, unpack it at the installation location you choose
    (typically <code class="filename">/usr/local/mysql</code>). This creates the
    directories shown in the following table.
</p>
<div class="table">
<a name="binary-installation-layout"></a><p class="title"><b>Table 2.3 MySQL Installation Layout for Generic Unix/Linux Binary Package</b></p>
<div class="table-contents">
<table><col width="45%"><col width="55%"><thead><tr>
        <th scope="col">Directory</th>
        <th scope="col">Contents of Directory</th>
      </tr></thead><tbody><tr>
        <td scope="row"><code class="filename">bin</code></td>
        <td><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server, client and utility programs</td>
      </tr><tr>
        <td scope="row"><code class="filename">docs</code></td>
        <td>MySQL manual in Info format</td>
      </tr><tr>
        <td scope="row"><code class="filename">man</code></td>
        <td>Unix manual pages</td>
      </tr><tr>
        <td scope="row"><code class="filename">include</code></td>
        <td>Include (header) files</td>
      </tr><tr>
        <td scope="row"><code class="filename">lib</code></td>
        <td>Libraries</td>
      </tr><tr>
        <td scope="row"><code class="filename">share</code></td>
        <td>Error messages, dictionary, and SQL for database installation</td>
      </tr><tr>
        <td scope="row"><code class="literal">support-files</code></td>
        <td>Miscellaneous support files</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
    Debug versions of the <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> binary are available
    as <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld-debug</strong></span></a>. To compile your own debug
    version of MySQL from a source distribution, use the appropriate
    configuration options to enable debugging support. See
    <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>.
  </p><a class="indexterm" name="idm46444443722320"></a><p>
    To install and use a MySQL binary distribution, the command sequence
    looks like this:
  </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>groupadd mysql</code></strong>
shell&gt; <strong class="userinput"><code>useradd -r -g mysql -s /bin/false mysql</code></strong>
shell&gt; <strong class="userinput"><code>cd /usr/local</code></strong>
shell&gt; <strong class="userinput"><code>tar xvf <em class="replaceable"><code>/path/to/mysql-VERSION-OS</code></em>.tar.xz</code></strong>
shell&gt; <strong class="userinput"><code>ln -s <em class="replaceable"><code>full-path-to-mysql-VERSION-OS</code></em> mysql</code></strong>
shell&gt; <strong class="userinput"><code>cd mysql</code></strong>
shell&gt; <strong class="userinput"><code>mkdir mysql-files</code></strong>
shell&gt; <strong class="userinput"><code>chown mysql:mysql mysql-files</code></strong>
shell&gt; <strong class="userinput"><code>chmod 750 mysql-files</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysqld --initialize --user=mysql</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysql_ssl_rsa_setup</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysqld_safe --user=mysql &amp;</code></strong>
# Next command is optional
shell&gt; <strong class="userinput"><code>cp support-files/mysql.server /etc/init.d/mysql.server</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      This procedure assumes that you have <code class="literal">root</code>
      (administrator) access to your system. Alternatively, you can
      prefix each command using the <span class="command"><strong>sudo</strong></span> (Linux) or
      <span class="command"><strong>pfexec</strong></span> (Solaris) command.
</p>
</div>
<p>
    The <code class="filename">mysql-files</code> directory provides a convenient
    location to use as the value for the
    <code class="literal">secure_file_priv</code> system variable, which limits
    import and export operations to a specific directory. See
    <a class="xref" href="server-administration.html#server-system-variables" title="5.1.8 Server System Variables">Section 5.1.8, “Server System Variables”</a>.
  </p><p>
    A more detailed version of the preceding description for installing
    a binary distribution follows.
</p>
<h3><a name="binary-installation-createsysuser"></a>Create a mysql User and Group</h3>
<p>
    If your system does not already have a user and group to use for
    running <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>, you may need to create them. The
    following commands add the <code class="literal">mysql</code> group and the
    <code class="literal">mysql</code> user. You might want to call the user and
    group something else instead of <code class="literal">mysql</code>. If so,
    substitute the appropriate name in the following instructions. The
    syntax for <span class="command"><strong>useradd</strong></span> and
    <span class="command"><strong>groupadd</strong></span> may differ slightly on different
    versions of Unix/Linux, or they may have different names such as
    <span class="command"><strong>adduser</strong></span> and <span class="command"><strong>addgroup</strong></span>.
  </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>groupadd mysql</code></strong>
shell&gt; <strong class="userinput"><code>useradd -r -g mysql -s /bin/false mysql</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      Because the user is required only for ownership purposes, not
      login purposes, the <span class="command"><strong>useradd</strong></span> command uses the
      <code class="option">-r</code> and <code class="option">-s /bin/false</code> options to
      create a user that does not have login permissions to your server
      host. Omit these options if your <span class="command"><strong>useradd</strong></span> does
      not support them.
</p>
</div>
<h3><a name="binary-installation-unpack"></a>Obtain and Unpack the Distribution</h3>
<p>
    Pick the directory under which you want to unpack the distribution
    and change location into it. The example here unpacks the
    distribution under <code class="filename">/usr/local</code>. The
    instructions, therefore, assume that you have permission to create
    files and directories in <code class="filename">/usr/local</code>. If that
    directory is protected, you must perform the installation as
    <code class="literal">root</code>.
  </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cd /usr/local</code></strong>
</pre><p>
    Obtain a distribution file using the instructions in
    <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>. For a given release, binary
    distributions for all platforms are built from the same MySQL source
    distribution.
  </p><p>
    Unpack the distribution, which creates the installation directory.
    <span class="command"><strong>tar</strong></span> can uncompress and unpack the distribution if
    it has <code class="literal">z</code> option support:
  </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>tar xvf <em class="replaceable"><code>/path/to/mysql-VERSION-OS</code></em>.tar.xz</code></strong>
</pre><p>
    The <span class="command"><strong>tar</strong></span> command creates a directory named
    <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>-<em class="replaceable"><code>OS</code></em></code>.
  </p><p>
    To install MySQL from a compressed <span class="command"><strong>tar</strong></span> file
    binary distribution, your system must have GNU <code class="literal">XZ
    Utils</code> to uncompress the distribution and a reasonable
    <span class="command"><strong>tar</strong></span> to unpack it.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      The compression algorithm changed from Gzip to XZ in MySQL Server
      8.0.12; and the generic binary's file extension changed from
      .tar.gz to .tar.xz.
</p>
</div>
<p>
    GNU <span class="command"><strong>tar</strong></span> is known to work. The standard
    <span class="command"><strong>tar</strong></span> provided with some operating systems is not
    able to unpack the long file names in the MySQL distribution. You
    should download and install GNU <span class="command"><strong>tar</strong></span>, or if
    available, use a preinstalled version of GNU tar. Usually this is
    available as <span class="command"><strong>gnutar</strong></span>, <span class="command"><strong>gtar</strong></span>, or
    as <span class="command"><strong>tar</strong></span> within a GNU or Free Software directory,
    such as <code class="filename">/usr/sfw/bin</code> or
    <code class="filename">/usr/local/bin</code>. GNU <span class="command"><strong>tar</strong></span> is
    available from <a class="ulink" href="http://www.gnu.org/software/tar/" target="_top">http://www.gnu.org/software/tar/</a>.
  </p><p>
    If your <span class="command"><strong>tar</strong></span> does not support the
    <code class="literal">xz</code> format then use the <span class="command"><strong>xz</strong></span>
    command to unpack the distribution and <span class="command"><strong>tar</strong></span> to
    unpack it. Replace the preceding <span class="command"><strong>tar</strong></span> command with
    the following alternative command to uncompress and extract the
    distribution:
  </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>xz -dc <em class="replaceable"><code>/path/to/mysql-VERSION-OS</code></em>.tar.xz | tar x</code></strong>
</pre><p>
    Next, create a symbolic link to the installation directory created
    by <span class="command"><strong>tar</strong></span>:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>ln -s <em class="replaceable"><code>full-path-to-mysql-VERSION-OS</code></em> mysql</code></strong>
</pre><p>
  </p><p>
    The <code class="literal">ln</code> command makes a symbolic link to the
    installation directory. This enables you to refer more easily to it
    as <code class="filename">/usr/local/mysql</code>. To avoid having to type
    the path name of client programs always when you are working with
    MySQL, you can add the <code class="filename">/usr/local/mysql/bin</code>
    directory to your <code class="literal">PATH</code> variable:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>export PATH=$PATH:/usr/local/mysql/bin</code></strong>
</pre><p>
</p>
<h3><a name="binary-installation-postinstall"></a>Perform Postinstallation Setup</h3>
<p>
    The remainder of the installation process involves setting
    distribution ownership and access permissions, initializing the data
    directory, starting the MySQL server, and setting up the
    configuration file. For instructions, see
    <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="windows-installation"></a>2.3 Installing MySQL on Microsoft Windows</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#windows-installation-layout">2.3.1 MySQL Installation Layout on Microsoft Windows</a></span></dt><dt><span class="section"><a href="installing.html#windows-choosing-package">2.3.2 Choosing an Installation Package</a></span></dt><dt><span class="section"><a href="installing.html#mysql-installer">2.3.3 MySQL Installer for Windows</a></span></dt><dt><span class="section"><a href="installing.html#windows-install-archive">2.3.4 Installing MySQL on Microsoft Windows Using a
<code class="literal">noinstall</code> ZIP Archive</a></span></dt><dt><span class="section"><a href="installing.html#windows-troubleshooting">2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation</a></span></dt><dt><span class="section"><a href="installing.html#windows-postinstallation">2.3.6 Windows Postinstallation Procedures</a></span></dt><dt><span class="section"><a href="installing.html#windows-restrictions">2.3.7 Windows Platform Restrictions</a></span></dt></dl>
</div>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
      MySQL 8.0 Server requires the Microsoft Visual C++
      2015 Redistributable Package to run on Windows platforms. Users
      should make sure the package has been installed on the system
      before installing the server. The package is available at the
      <a class="ulink" href="http://www.microsoft.com/en-us/download/default.aspx" target="_top">Microsoft
      Download Center</a>. Additionally, MySQL debug binaries
      require Visual Studio 2015 to be installed.
</p>
</div>
<p>
    MySQL is available for Microsoft Windows 64-bit operating systems
    only. For supported Windows platform information, see
    <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_top">https://www.mysql.com/support/supportedplatforms/database.html</a>.
  </p><p>
    There are different methods to install MySQL on Microsoft Windows.
</p>
<h3><a name="idm46444443642048"></a>MySQL Installer Method</h3>
<p>
    The simplest and recommended method is to download MySQL Installer (for
    Windows) and let it install and configure a specific version of
    MySQL Server as follows:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
        Download MySQL Installer from <a class="ulink" href="https://dev.mysql.com/downloads/installer/" target="_top">https://dev.mysql.com/downloads/installer/</a>
        and execute it.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Unlike the standard MySQL Installer, the smaller "web-community" version
          does not bundle any MySQL applications but it will download
          the MySQL products you choose to install.
</p>
</div>
</li><li class="listitem"><p>
        Determine the setup type to use for the initial installation of
        MySQL products. For example:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="guilabel">Developer Default</span>: Provides a setup
            type that includes the selected version of MySQL Server and
            other MySQL tools related to MySQL development, such as
            MySQL Workbench.
          </p></li><li class="listitem"><p>
            <span class="guilabel">Server Only</span>: Provides a setup for the
            selected version of MySQL Server without other products.
          </p></li><li class="listitem"><p>
            <span class="guilabel">Custom</span>: Enables you to select any
            version of MySQL Server and other MySQL products.
</p></li></ul>
</div>
</li><li class="listitem"><p>
        Install the server instance (and products) and then begin the
        server configuration by first selecting one of the following
        levels of availability for the server instance:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="guilabel">Standalone MySQL Server / Classic MySQL
            Replication (default)</span>
          </p><p>
            Configures a server instance to run without high
            availability.
          </p></li><li class="listitem"><p>
            <span class="guilabel">InnoDB cluster</span>
          </p><p>
            Provides two configuration options based on
            MySQL Group Replication to:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                Configure multiple server instances in a sandbox
                InnoDB cluster on the local host (for testing only).
              </p></li><li class="listitem"><p>
                Create a new InnoDB cluster and configure one seed
                instance or add a new server instance to an existing
                InnoDB cluster.
</p></li></ul>
</div>
</li></ul>
</div>
</li><li class="listitem"><p>
        Complete the configuration process by following the onscreen
        instructions. For more information about each individual step,
        see <a class="xref" href="installing.html#mysql-installer-workflow-server" title="2.3.3.3.1 MySQL Server Configuration with MySQL Installer">Section 2.3.3.3.1, “MySQL Server Configuration with MySQL Installer”</a>.
</p></li></ol>
</div>
<p>
    MySQL is now installed. If you configured MySQL as a service, then
    Windows will automatically start MySQL server every time you restart
    your system. Also, this process installs the MySQL Installer application on the
    local host, which you can use later to upgrade or reconfigure MySQL
    server.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      If you installed MySQL Workbench on your system, consider using it to
      check your new MySQL server connection. By default, the program
      automatically start after installing MySQL.
</p>
</div>
<h3><a name="idm46444443620128"></a>Additional Installation Information</h3>
<p>
    It is possible to run MySQL as a standard application or as a
    Windows service. By using a service, you can monitor and control the
    operation of the server through the standard Windows service
    management tools. For more information, see
    <a class="xref" href="installing.html#windows-start-service" title="2.3.4.8 Starting MySQL as a Windows Service">Section 2.3.4.8, “Starting MySQL as a Windows Service”</a>.
  </p><p>
    To accommodate the <a class="link" href="sql-statements.html#restart" title="13.7.8.8 RESTART Statement"><code class="literal">RESTART</code></a> statement,
    the MySQL server forks when run as a service or standalone, to
    enable a monitor process to supervise the server process. In this
    case, you will observe two <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> processes. If
    <a class="link" href="sql-statements.html#restart" title="13.7.8.8 RESTART Statement"><code class="literal">RESTART</code></a> capability is not required,
    the server can be started with the
    <a class="link" href="server-administration.html#option_mysqld_no-monitor"><code class="option">--no-monitor</code></a> option. See
    <a class="xref" href="sql-statements.html#restart" title="13.7.8.8 RESTART Statement">Section 13.7.8.8, “RESTART Statement”</a>.
  </p><p>
    Generally, you should install MySQL on Windows using an account that
    has administrator rights. Otherwise, you may encounter problems with
    certain operations such as editing the <code class="literal">PATH</code>
    environment variable or accessing the <span class="command"><strong>Service Control
    Manager</strong></span>. When installed, MySQL does not need to be
    executed using a user with Administrator privileges.
  </p><p>
    For a list of limitations on the use of MySQL on the Windows
    platform, see <a class="xref" href="installing.html#windows-restrictions" title="2.3.7 Windows Platform Restrictions">Section 2.3.7, “Windows Platform Restrictions”</a>.
  </p><p>
    In addition to the MySQL Server package, you may need or want
    additional components to use MySQL with your application or
    development environment. These include, but are not limited to:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        To connect to the MySQL server using ODBC, you must have a
        Connector/ODBC driver. For more information, including
        installation and configuration instructions, see
        <a class="ulink" href="https://dev.mysql.com/doc/connector-odbc/en/" target="_top">MySQL Connector/ODBC Developer Guide</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          MySQL Installer will install and configure Connector/ODBC for you.
</p>
</div>
</li><li class="listitem"><p>
        To use MySQL server with .NET applications, you must have the
        Connector/NET driver. For more information, including installation and
        configuration instructions, see <a class="ulink" href="https://dev.mysql.com/doc/connector-net/en/" target="_top">MySQL Connector/NET Developer Guide</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          MySQL Installer will install and configure MySQL Connector/NET for you.
</p>
</div>
</li></ul>
</div>
<p>
    MySQL distributions for Windows can be downloaded from
    <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">https://dev.mysql.com/downloads/</a>. See
    <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>.
  </p><p>
    MySQL for Windows is available in several distribution formats,
    detailed here. Generally speaking, you should use MySQL Installer. It contains
    more features and MySQL products than the older MSI, is simpler to
    use than the compressed file, and you need no additional tools to
    get MySQL up and running. MySQL Installer automatically installs MySQL Server
    and additional MySQL products, creates an options file, starts the
    server, and enables you to create default user accounts. For more
    information on choosing a package, see
    <a class="xref" href="installing.html#windows-choosing-package" title="2.3.2 Choosing an Installation Package">Section 2.3.2, “Choosing an Installation Package”</a>.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        A MySQL Installer distribution includes MySQL Server and additional MySQL
        products including MySQL Workbench, MySQL for Visual Studio, and MySQL for Excel. MySQL Installer can
        also be used to upgrade these products in the future (see
        <a class="ulink" href="https://dev.mysql.com/doc/mysql-compat-matrix/en/" target="_top">https://dev.mysql.com/doc/mysql-compat-matrix/en/</a>).
      </p><p>
        For instructions on installing MySQL using MySQL Installer, see
        <a class="xref" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">Section 2.3.3, “MySQL Installer for Windows”</a>.
      </p></li><li class="listitem"><p>
        The standard binary distribution (packaged as a compressed file)
        contains all of the necessary files that you unpack into your
        chosen location. This package contains all of the files in the
        full Windows MSI Installer package, but does not include an
        installation program.
      </p><p>
        For instructions on installing MySQL using the compressed file,
        see <a class="xref" href="installing.html#windows-install-archive" title="2.3.4 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive">Section 2.3.4, “Installing MySQL on Microsoft Windows Using a
      <code class="literal">noinstall</code> ZIP Archive”</a>.
      </p></li><li class="listitem"><p>
        The source distribution format contains all the code and support
        files for building the executables using the Visual Studio
        compiler system.
      </p><p>
        For instructions on building MySQL from source on Windows, see
        <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>.
</p></li></ul>
</div>
<h3><a name="idm46444443591456"></a>MySQL on Windows Considerations</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        <span class="bold"><strong>Large Table Support</strong></span>
      </p><p>
        If you need tables with a size larger than 4GB, install MySQL on
        an NTFS or newer file system. Do not forget to use
        <code class="literal">MAX_ROWS</code> and
        <code class="literal">AVG_ROW_LENGTH</code> when you create tables. See
        <a class="xref" href="sql-statements.html#create-table" title="13.1.20 CREATE TABLE Statement">Section 13.1.20, “CREATE TABLE Statement”</a>.
      </p></li><li class="listitem"><p>
        <span class="bold"><strong>MySQL and Virus Checking
        Software</strong></span>
      </p><p>
        Virus-scanning software such as Norton/Symantec Anti-Virus on
        directories containing MySQL data and temporary tables can cause
        issues, both in terms of the performance of MySQL and the
        virus-scanning software misidentifying the contents of the files
        as containing spam. This is due to the fingerprinting mechanism
        used by the virus-scanning software, and the way in which MySQL
        rapidly updates different files, which may be identified as a
        potential security risk.
      </p><p>
        After installing MySQL Server, it is recommended that you
        disable virus scanning on the main directory
        (<a class="link" href="server-administration.html#sysvar_datadir"><code class="literal">datadir</code></a>) used to store your
        MySQL table data. There is usually a system built into the
        virus-scanning software to enable specific directories to be
        ignored.
      </p><p>
        In addition, by default, MySQL creates temporary files in the
        standard Windows temporary directory. To prevent the temporary
        files also being scanned, configure a separate temporary
        directory for MySQL temporary files and add this directory to
        the virus scanning exclusion list. To do this, add a
        configuration option for the
        <a class="link" href="server-administration.html#option_mysqld_tmpdir"><code class="option">tmpdir</code></a> parameter to your
        <code class="filename">my.ini</code> configuration file. For more
        information, see <a class="xref" href="installing.html#windows-create-option-file" title="2.3.4.2 Creating an Option File">Section 2.3.4.2, “Creating an Option File”</a>.
</p></li></ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-installation-layout"></a>2.3.1 MySQL Installation Layout on Microsoft Windows</h3>

</div>

</div>

</div>
<p>
      For MySQL 8.0 on Windows, the default installation
      directory is <code class="filename">C:\Program Files\MySQL\MySQL Server
      8.0</code> for installations performed with MySQL Installer.
      If you use the ZIP archive method to install MySQL, you may prefer
      to install in <code class="filename">C:\mysql</code>. However, the layout
      of the subdirectories remains the same.
    </p><p>
      All of the files are located within this parent directory, using
      the structure shown in the following table.
</p>
<div class="table">
<a name="idm46444443574752"></a><p class="title"><b>Table 2.4 Default MySQL Installation Layout for Microsoft Windows</b></p>
<div class="table-contents">
<table><col width="30%"><col width="40%"><col width="30%"><thead><tr>
          <th scope="col">Directory</th>
          <th scope="col">Contents of Directory</th>
          <th scope="col">Notes</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="filename">bin</code></td>
          <td><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server, client and utility programs</td>
          <td></td>
        </tr><tr>
          <td scope="row"><code class="filename">%PROGRAMDATA%\MySQL\MySQL Server 8.0\</code></td>
          <td>Log files, databases</td>
          <td>The Windows system variable <code class="varname">%PROGRAMDATA%</code> defaults to
            <code class="filename">C:\ProgramData</code>.</td>
        </tr><tr>
          <td scope="row"><code class="filename">docs</code></td>
          <td>Release documentation</td>
          <td>With MySQL Installer, use the <code class="literal">Modify</code> operation to select this
            optional folder.</td>
        </tr><tr>
          <td scope="row"><code class="filename">include</code></td>
          <td>Include (header) files</td>
          <td></td>
        </tr><tr>
          <td scope="row"><code class="filename">lib</code></td>
          <td>Libraries</td>
          <td></td>
        </tr><tr>
          <td scope="row"><code class="filename">share</code></td>
          <td>Miscellaneous support files, including error messages, character set
            files, sample configuration files, SQL for database
            installation</td>
          <td></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-choosing-package"></a>2.3.2 Choosing an Installation Package</h3>

</div>

</div>

</div>
<p>
      For MySQL 8.0, there are multiple installation
      package formats to choose from when installing MySQL on Windows.
      The package formats described in this section are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#windows-choosing-package-mysql-installer" title="MySQL Installer">MySQL Installer</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#windows-choosing-package-no-zip" title="MySQL noinstall ZIP Archives">MySQL noinstall ZIP Archives</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#windows-choosing-package-docker" title="MySQL Docker Images">MySQL Docker Images</a></p></li></ul>
</div>
<p>
      Program Database (PDB) files (with file name extension
      <code class="filename">pdb</code>) provide information for debugging your
      MySQL installation in the event of a problem. These files are
      included in ZIP Archive distributions (but not MSI distributions)
      of MySQL.
</p>
<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="windows-choosing-package-mysql-installer"></a>MySQL Installer</h4>
</div>
</div>
</div>
<p>
        This package has a file name similar to
        <code class="filename">mysql-installer-community-8.0.22.0.msi</code>
        or
        <code class="filename">mysql-installer-commercial-8.0.22.0.msi</code>,
        and utilizes MSIs to automatically install MySQL server and
        other products. MySQL Installer will download and apply updates to itself,
        and for each of the installed products. It also configures the
        installed MySQL server (including a sandbox InnoDB cluster test
        setup) and MySQL Router. MySQL Installer is recommended for most users.
      </p><p>
        MySQL Installer can install and manage (add, modify, upgrade, and remove)
        many other MySQL products, including:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Applications – MySQL Workbench, MySQL for Visual Studio, MySQL for Excel,
            MySQL Shell, and MySQL Router (see
            <a class="ulink" href="https://dev.mysql.com/doc/mysql-compat-matrix/en/" target="_top">https://dev.mysql.com/doc/mysql-compat-matrix/en/</a>)
          </p></li><li class="listitem"><p>
            Connectors – MySQL Connector/C++, MySQL Connector/NET, Connector/ODBC, MySQL Connector/Python, MySQL Connector/J,
            MySQL Connector/Node.js
          </p></li><li class="listitem"><p>
            Documentation – MySQL Manual (PDF format), samples and
            examples
</p></li></ul>
</div>
<p>
        MySQL Installer operates on all MySQL supported versions of Windows (see
        <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_top">https://www.mysql.com/support/supportedplatforms/database.html</a>).
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Because MySQL Installer is not a native component of Microsoft Windows
          and depends on .NET, it will not work on minimal installation
          options like the Server Core version of Windows Server.
</p>
</div>
<p>
        For instructions on how to install MySQL using MySQL Installer, see
        <a class="xref" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">Section 2.3.3, “MySQL Installer for Windows”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="windows-choosing-package-no-zip"></a>MySQL noinstall ZIP Archives</h4>

</div>

</div>

</div>
<p>
        These packages contain the files found in the complete MySQL
        Server installation package, with the exception of the GUI. This
        format does not include an automated installer, and must be
        manually installed and configured.
      </p><p>
        The <code class="literal">noinstall</code> ZIP archives are split into two
        separate compressed files. The main package is named
        <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>-winx64.zip</code>.
        This contains the components needed to use MySQL on your system.
        The optional MySQL test suite, MySQL benchmark suite, and
        debugging binaries/information components (including PDB files)
        are in a separate compressed file named
        <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>-winx64-debug-test.zip</code>.
      </p><p>
        If you choose to install a <code class="literal">noinstall</code> ZIP
        archive, see <a class="xref" href="installing.html#windows-install-archive" title="2.3.4 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive">Section 2.3.4, “Installing MySQL on Microsoft Windows Using a
      <code class="literal">noinstall</code> ZIP Archive”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="windows-choosing-package-docker"></a>MySQL Docker Images</h4>

</div>

</div>

</div>
<p>
        For information on using the MySQL Docker images provided by
        Oracle on Windows platform, see
        <a class="xref" href="installing.html#deploy-mysql-nonlinux-docker" title="2.5.6.3 Deploying MySQL on Windows and Other Non-Linux Platforms with Docker">Section 2.5.6.3, “Deploying MySQL on Windows and Other Non-Linux Platforms with Docker”</a>.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
          The MySQL Docker images provided by Oracle are built
          specifically for Linux platforms. Other platforms are not
          supported, and users running the MySQL Docker images from
          Oracle on them are doing so at their own risk.
</p>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="mysql-installer"></a>2.3.3 MySQL Installer for Windows</h3>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#mysql-installer-setup">2.3.3.1 MySQL Installer Initial Setup</a></span></dt><dt><span class="section"><a href="installing.html#mysql-installer-change-path-proc">2.3.3.2 Setting Alternative Server Paths with MySQL Installer</a></span></dt><dt><span class="section"><a href="installing.html#mysql-installer-workflow">2.3.3.3 Installation Workflow with MySQL Installer</a></span></dt><dt><span class="section"><a href="installing.html#mysql-installer-catalog-dashboard">2.3.3.4 MySQL Installer Product Catalog and Dashboard</a></span></dt><dt><span class="section"><a href="installing.html#MySQLInstallerConsole">2.3.3.5 MySQLInstallerConsole Reference</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444443511344"></a><p>
    MySQL Installer is a standalone application designed to ease the complexity of
    installing and configuring MySQL products that run on Microsoft
    Windows. It supports the following MySQL products:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        MySQL Servers
      </p><p>
        MySQL Installer can install and manage multiple, separate MySQL server
        instances on the same host at the same time. For example, MySQL Installer
        can install, configure, and upgrade a separate instance of MySQL
        5.6, MySQL 5.7, and MySQL 8.0 on the same host. MySQL Installer does not
        permit server upgrades between major and minor version numbers,
        but does permit upgrades within a release series (such as 5.7.18
        to 5.7.19).
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          MySQL Installer cannot install both <span class="emphasis"><em>Community</em></span> and
          <span class="emphasis"><em>Commercial</em></span> releases of MySQL server on
          the same host. If you require both releases on the same host,
          consider using the
          <a class="link" href="installing.html#windows-choosing-package-no-zip" title="MySQL noinstall ZIP Archives">ZIP
          archive</a> distribution to install one of the releases.
</p>
</div>
</li><li class="listitem"><p>
        MySQL Applications
      </p><p>
        MySQL Workbench, MySQL Shell, MySQL Router, MySQL for Visual Studio, MySQL for Excel, and
        MySQL Notifier.
      </p></li><li class="listitem"><p>
        MySQL Connectors
      </p><p>
        MySQL Connector/NET, MySQL Connector/Python, MySQL Connector/ODBC, MySQL Connector/J, and MySQL Connector/C++.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          To install MySQL Connector/Node.js, see
          <a class="ulink" href="https://dev.mysql.com/downloads/connector/nodejs/" target="_top">https://dev.mysql.com/downloads/connector/nodejs/</a>.
          Connector/Node.js does not provide an <code class="filename">.msi</code> file
          for use with MySQL Installer.
</p>
</div>
</li><li class="listitem"><p>
        Documentation and Samples
      </p><p>
        MySQL Reference Manuals (by version) in PDF format and MySQL
        database samples (by version).
</p></li></ul>
</div>
<h4><a name="mysql-installer-requiremetns"></a>Installation Requirements</h4>
<p>
    MySQL Installer requires Microsoft .NET Framework 4.5.2 or later. If this
    version is not installed on the host computer, you can download it
    by visiting the
    <a class="ulink" href="https://www.microsoft.com/en-us/download/details.aspx?id=42643" target="_top">Microsoft
    website</a>.
</p>
<h4><a name="mysql-installer-community-edition"></a>MySQL Installer Community Release</h4>
<p>
    Download software from <a class="ulink" href="https://dev.mysql.com/downloads/installer/" target="_top">https://dev.mysql.com/downloads/installer/</a>
    to install the Community release of all MySQL products for Windows.
    Select one of the following MySQL Installer package options:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        <span class="emphasis"><em>Web</em></span>: Contains MySQL Installer and configuration files
        only. The web package downloads only the MySQL products you
        select to install, but it requires an internet connection for
        each download. The size of this file is approximately 2 MB; the
        name of the file has the form
        <code class="filename">mysql-installer-community-<code class="literal">web</code>-<em class="replaceable"><code>VERSION</code></em>.<em class="replaceable"><code>N</code></em>.msi</code>
        where <code class="literal">VERSION</code> is the MySQL server version
        number such as 8.0 and
        <code class="literal">N</code> is the package number, which begins at 0.
      </p></li><li class="listitem"><p>
        <span class="emphasis"><em>Full or Current Bundle</em></span>: Bundles all of the
        MySQL products for Windows (including the MySQL server). The
        file size is over 300 MB, and the name has the form
        <code class="filename">mysql-installer-community-<em class="replaceable"><code>VERSION</code></em>.<em class="replaceable"><code>N</code></em>.msi</code>
        where <code class="literal">VERSION</code> is the MySQL Server version
        number such as 8.0 and
        <code class="literal">N</code> is the package number, which begins at 0.
</p></li></ul>
</div>
<h4><a name="mysql-installer-commercial-edition"></a>MySQL Installer Commercial Release</h4>
<p>
    Download software from <a class="ulink" href="https://edelivery.oracle.com/" target="_top">https://edelivery.oracle.com/</a>
    to install the Commercial release (Standard or Enterprise Edition)
    of MySQL products for Windows. If you are logged in to your My
    Oracle Support (MOS) account, the Commercial release includes all of
    the current and previous GA versions available in the Community
    release, but it excludes development-milestone versions. When you
    are not logged in, you see only the list of bundled products that
    you downloaded already.
  </p><p>
    The Commercial release also includes the following products:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        Workbench SE/EE
      </p></li><li class="listitem"><p>
        MySQL Enterprise Backup
      </p></li><li class="listitem"><p>
        MySQL Enterprise Firewall
</p></li></ul>
</div>
<p>
    The Commercial release integrates with your MOS account. For
    knowledge-base content and patches, see
    <a class="ulink" href="https://support.oracle.com/" target="_top">My Oracle Support</a>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="mysql-installer-setup"></a>2.3.3.1 MySQL Installer Initial Setup</h4>

</div>

</div>

</div>

<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#setup-type" title="Choosing a Setup Type">Choosing a Setup Type</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#setup-conflicts" title="Path Conflicts">Path Conflicts</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#setup-requirements" title="Check Requirements">Check Requirements</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#setup-layout" title="MySQL Installer Configuration Files">MySQL Installer Configuration Files</a></p></li></ul>
</div>
<p>
      When you download MySQL Installer for the first time, a setup wizard guides
      you through the initial installation of MySQL products. As the
      following figure shows, the initial setup is a one-time activity
      in the overall process. MySQL Installer detects existing MySQL products
      installed on the host during its initial setup and adds them to
      the list of products to be managed.
</p>
<div class="figure">
<a name="mysql-installer-overview-fig"></a><p class="title"><b>Figure 2.7 MySQL Installer Process Overview</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mi-process-overview.png" width="722" height="171" alt="MySQL Installer process. Non-repeating steps: download MySQL Installer; perform the initial setup. Repeating steps: install products (download products, run .msi files, configuration, and install complete); manage products and update the MySQL Installer catalog.">
</div>

</div>

</div>
<br class="figure-break"><p>
      MySQL Installer extracts configuration files (described later) to the hard
      drive of the host during the initial setup. Although MySQL Installer is a
      32-bit application, it can install both 32-bit and 64-bit
      binaries.
    </p><p>
      The initial setup adds a link to the Start menu under the
      <span class="guimenu">MySQL</span> group. Click <span class="guimenu">Start</span>,
      <span class="guimenu">All Programs</span>, <span class="guimenu">MySQL</span>,
      <span class="guimenu">MySQL Installer</span> to open MySQL Installer.
</p>
<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h5 class="title"><a name="setup-type"></a>Choosing a Setup Type</h5>
</div>
</div>
</div>
<p>
        During the initial setup, you are prompted to select the MySQL
        products to be installed on the host. One alternative is to use
        a predetermined setup type that matches your setup requirements.
        By default, both GA and pre-release products are included in the
        download and installation with the <span class="guilabel">Developer
        Default</span>, <span class="guilabel">Client only</span>, and
        <span class="guilabel">Full</span> setup types. Select the <span class="guilabel">Only
        install GA products</span> option to restrict the product
        set to include GA products only when using these setup types.
      </p><p>
        Choosing one of the following setup types determines the initial
        installation only and does not limit your ability to install or
        update MySQL products for Windows later:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="guilabel">Developer Default</span>: Install the
            following products that compliment application development
            with MySQL:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <a class="ulink" href="http://dev.mysql.com/doc/" target="_top">MySQL
                Server</a> (Installs the version that you selected
                when you downloaded MySQL Installer.)
              </p></li><li class="listitem"><p>
                <a class="ulink" href="https://dev.mysql.com/doc/mysql-shell/8.0/en/" target="_top">MySQL Shell</a>
              </p></li><li class="listitem"><p>
                <a class="ulink" href="https://dev.mysql.com/doc/mysql-router/8.0/en/" target="_top">MySQL Router</a>
              </p></li><li class="listitem"><p>
                <a class="link" href="workbench.html" title="Chapter 31 MySQL Workbench">MySQL Workbench</a>
              </p></li><li class="listitem"><p>
                <a class="ulink" href="https://dev.mysql.com/doc/visual-studio/en/" target="_top">MySQL for Visual Studio</a>
              </p></li><li class="listitem"><p>
                <a class="ulink" href="https://dev.mysql.com/doc/mysql-for-excel/en/" target="_top">MySQL for Excel</a>
              </p></li><li class="listitem"><p>
                <a class="ulink" href="https://dev.mysql.com/doc/mysql-notifier/en/mysql-notifier-overview.html" target="_top">MySQL Notifier</a>
              </p></li><li class="listitem"><p>
                <a class="ulink" href="http://dev.mysql.com/doc/index-connectors.html" target="_top">MySQL
                Connectors</a> (for .NET / Python / ODBC / Java /
                C++)
              </p></li><li class="listitem"><p>
                MySQL Documentation
              </p></li><li class="listitem"><p>
                MySQL Samples and Examples
</p></li></ul>
</div>
</li><li class="listitem"><p>
            <span class="bold"><strong>Server only</strong></span>: Only install
            the MySQL server. This setup type installs the general
            availability (GA) or development release server that you
            selected when you downloaded MySQL Installer. It uses the default
            installation and data paths.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Client only</strong></span>: Only install
            the most recent MySQL applications and MySQL connectors.
            This setup type is similar to the <code class="literal">Developer
            Default</code> type, except that it does not include
            MySQL server or the client programs typically bundled with
            the server, such as <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> or
            <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Full</strong></span>: Install all available
            MySQL products.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Custom</strong></span>: The custom setup
            type enables you to filter and select individual MySQL
            products from the
            <a class="link" href="installing.html#windows-product-catalog" title="Product Catalog">MySQL Installer catalog</a>.
          </p><p>
            Use the <code class="literal">Custom</code> setup type to install:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                A product or product version that is not available from
                the usual download locations. The catalog contains all
                product releases, including the other releases between
                pre-release (or development) and GA.
              </p></li><li class="listitem"><p>
                An instance of MySQL server using an alternative
                installation path, data path, or both. For instructions
                on how to adjust the paths, see
                <a class="xref" href="installing.html#mysql-installer-change-path-proc" title="2.3.3.2 Setting Alternative Server Paths with MySQL Installer">Section 2.3.3.2, “Setting Alternative Server Paths with MySQL Installer”</a>.
              </p></li><li class="listitem"><p>
                Two or more MySQL server versions on the same host at
                the same time (for example, 5.6, 5.7, and 8.0).
              </p></li><li class="listitem"><p>
                A specific combination of products and features not
                offered as a predetermine setup type. For example, you
                can install a single product, such as MySQL Workbench,
                instead of installing all client applications for
                Windows.
</p></li></ul>
</div>
</li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title"><a name="setup-conflicts"></a>Path Conflicts</h5>

</div>

</div>

</div>
<p>
        When the default installation or data folder (required by MySQL
        server) for a product to be installed already exists on the
        host, the wizard displays the <span class="guilabel">Path Conflict</span>
        step to identify each conflict and enable you to take action to
        avoid having files in the existing folder overwritten by the new
        installation. You see this step in the initial setup only when
        MySQL Installer detects a conflict.
      </p><p>
        To resolve the path conflict, do one of the following:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Select a product from the list to display the conflict
            options. A warning symbol indicates which path is in
            conflict. Use the browse button to choose a new path and
            then click <span class="guibutton">Next</span>.
          </p></li><li class="listitem"><p>
            Click <span class="guibutton">Back</span> to choose a different
            setup type or product version, if applicable. The
            <code class="literal">Custom</code> setup type enables you to select
            individual product versions.
          </p></li><li class="listitem"><p>
            Click <span class="guibutton">Next</span> to ignore the conflict and
            overwrite files in the existing folder.
          </p></li><li class="listitem"><p>
            Delete the existing product. Click
            <span class="guibutton">Cancel</span> to stop the initial setup and
            close MySQL Installer. Open MySQL Installer again from the Start menu and delete
            the installed product from the host using the Delete
            operation from the
            <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">dashboard</a>.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title"><a name="setup-requirements"></a>Check Requirements</h5>

</div>

</div>

</div>
<p>
        MySQL Installer uses entries in the <code class="filename">package-rules.xml</code>
        file to determine whether the prerequisite software for each
        product is installed on the host. When the requirements check
        fails, MySQL Installer displays the <span class="guilabel">Check Requirements</span>
        step to help you update the host. Requirements are evaluated
        each time you download a new product (or version) for
        installation. The following figure identifies and describes the
        key areas of this step.
</p>
<div class="figure">
<a name="mysql-installer-requirements-fig"></a><p class="title"><b>Figure 2.8 Check Requirements</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mi-requirements-annotated.png" width="594" height="387" alt="MySQL Installer check-requirements before any requirements are downloaded and installed.">
</div>

</div>

</div>
<br class="figure-break"><h6><a name="setup-requirements-elements"></a>Description of Check Requirements Elements</h6>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Shows the current step in the initial setup. Steps in this
            list may change slightly depending on the products already
            installed on the host, the availability of prerequisite
            software, and the products to be installed on the host.
          </p></li><li class="listitem"><p>
            Lists all pending installation requirements by product and
            indicates the status as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                A blank space in the <span class="guilabel">Status</span> column
                means that MySQL Installer can attempt to download and install the
                required software for you.
              </p></li><li class="listitem"><p>
                The word <span class="emphasis"><em>Manual</em></span> in the
                <span class="guilabel">Status</span> column means that you must
                satisfy the requirement manually. Select each product in
                the list to see its requirement details.
</p></li></ul>
</div>
</li><li class="listitem"><p>
            Describes the requirement in detail to assist you with each
            manual resolution. When possible, a download URL is
            provided. After you download and install the required
            software, click <span class="guibutton">Check</span> to verify that
            the requirement has been met.
          </p></li><li class="listitem"><p>
            Provides the following set operations to proceed:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                <span class="guibutton">Back</span> – Return to the
                previous step. This action enables you to select a
                different the setup type.
              </p></li><li class="listitem"><p>
                <span class="guibutton">Execute</span> – Have MySQL Installer attempt
                to download and install the required software for all
                items without a manual status. Manual requirements are
                resolved by you and verified by clicking
                <span class="guibutton">Check</span>.
              </p></li><li class="listitem"><p>
                <span class="guibutton">Next</span> – Do not execute the
                request to apply the requirements automatically and
                proceed to the installation without including the
                products that fail the check requirements step.
              </p></li><li class="listitem"><p>
                <span class="guibutton">Cancel</span> – Stop the
                installation of MySQL products. Because MySQL Installer is already
                installed, the initial setup begins again when you open
                MySQL Installer from the Start menu and click
                <span class="guibutton">Add</span> from the dashboard. For a
                description of the available management operations, see
                <a class="xref" href="installing.html#windows-product-catalog" title="Product Catalog">Product Catalog</a>.
</p></li></ul>
</div>
</li></ol>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title"><a name="setup-layout"></a>MySQL Installer Configuration Files</h5>

</div>

</div>

</div>
<p>
        All MySQL Installer files are located within the <code class="filename">C:\Program Files
        (x86)</code> and <code class="filename">C:\ProgramData</code>
        folders. The following table describes the files and folders
        that define MySQL Installer as a standalone application.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Installed MySQL products are neither altered nor removed when
          you update or uninstall MySQL Installer.
</p>
</div>

<div class="table">
<a name="idm46444443370576"></a><p class="title"><b>Table 2.5 MySQL Installer Configuration Files</b></p>
<div class="table-contents">
<table><col width="30%"><col width="40%"><col width="30%"><thead><tr>
            <th scope="col">File or Folder</th>
            <th scope="col">Description</th>
            <th scope="col">Folder Hierarchy</th>
          </tr></thead><tbody><tr>
            <td scope="row"><code class="filename">MySQL Installer for Windows</code></td>
            <td>This folder contains all of the files needed to run MySQL Installer and
              <a class="link" href="installing.html#MySQLInstallerConsole" title="2.3.3.5 MySQLInstallerConsole Reference">MySQLInstallerConsole.exe</a>,
              a command-line program with similar functionality.</td>
            <td><code class="filename">C:\Program Files (x86)</code></td>
          </tr><tr>
            <td scope="row"><code class="filename">Templates</code></td>
            <td>The <code class="filename">Templates</code> folder has one file for each version
              of MySQL server. Template files contain keys and formulas
              to calculate some values dynamically.</td>
            <td><code class="filename">C:\ProgramData\MySQL\MySQL Installer for
              Windows\Manifest</code></td>
          </tr><tr>
            <td scope="row"><code class="filename">package-rules.xml</code></td>
            <td><p>
                This file contains the prerequisites for every product
                to be installed.
              </p></td>
            <td><code class="filename">C:\ProgramData\MySQL\MySQL Installer for
              Windows\Manifest</code></td>
          </tr><tr>
            <td scope="row"><code class="filename">produts.xml</code></td>
            <td><p>
                The <code class="filename">products</code> file (or product
                catalog) contains a list of all products available for
                download.
              </p></td>
            <td><code class="filename">C:\ProgramData\MySQL\MySQL Installer for
              Windows\Manifest</code></td>
          </tr><tr>
            <td scope="row"><code class="filename">Product Cache</code></td>
            <td><p>
                The <code class="filename">Product Cache</code> folder contains
                all standalone <code class="filename">.msi</code> files bundled
                with the full package or downloaded afterward.
              </p></td>
            <td><code class="filename">C:\ProgramData\MySQL\MySQL Installer for Windows</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="mysql-installer-change-path-proc"></a>2.3.3.2 Setting Alternative Server Paths with MySQL Installer</h4>

</div>

</div>

</div>
<div class="procedure">
<p>
        You can change the default installation path, the data path, or
        both when you install MySQL server. After you have installed the
        server, the paths cannot be altered without removing and
        reinstalling the server instance.
      </p><p>
        <span class="bold"><strong>To change paths for MySQL
        server</strong></span>
      </p><ol class="procedure" type="1"><li class="step"><p>
          Identify the MySQL server to change and display the
          <span class="guilabel">Advanced Options</span> link.
        </p><ol type="a" class="substeps"><li class="step"><p>
              Navigate to the <span class="guilabel">Select Products and
              Features</span> step by doing one of the following:
            </p><ol type="i" class="substeps"><li class="step"><p>
                  If this is an
                  <a class="link" href="installing.html#mysql-installer-setup" title="2.3.3.1 MySQL Installer Initial Setup">initial
                  setup</a> of MySQL Installer, select the
                  <code class="literal">Custom</code> setup type and click
                  <span class="guibutton">Next</span>.
                </p></li><li class="step"><p>
                  If MySQL Installer is installed already, launch it from the Start
                  menu and then click <span class="guibutton">Add</span> from
                  the dashboard.
                </p></li></ol></li><li class="step"><p>
              Click <span class="guibutton">Edit</span> to apply a filter on the
              product list shown in <span class="guilabel">Available
              Products</span> (see
              <a class="xref" href="installing.html#locate-products" title="Locating Products to Install">Locating Products to Install</a>.
            </p></li><li class="step"><p>
              With the server instance selected, use the arrow to move
              the selected server to the <span class="guilabel">Products/Features To
              Be Installed</span> list.
            </p></li><li class="step"><p>
              Click the server to select it. When you select the server,
              the <span class="guilabel">Advanced Options</span> link appears.
              For details, see the figure that follows.
            </p></li></ol></li><li class="step"><p>
          Click <span class="guilabel">Advanced Options</span> to open a dialog
          box where you can enter alternative path names. After the path
          names are validated, click <span class="guibutton">Next</span> to
          continue with the configuration steps.
</p>
<div class="figure">
<a name="mysql-installer-custom-path-fig"></a><p class="title"><b>Figure 2.9 Change MySQL Server Path</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mi-path-advanced-options.png" width="541" height="381" alt="Content is described in the surrounding text.">
</div>

</div>

</div>
<br class="figure-break"></li></ol>
</div>

</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="mysql-installer-workflow"></a>2.3.3.3 Installation Workflow with MySQL Installer</h4>

</div>

</div>

</div>
<p>
      MySQL Installer provides a wizard-like tool to install and configure new
      MySQL products for Windows. Unlike the initial setup, which runs
      only once, MySQL Installer invokes the wizard each time you download or
      install a new product. For first-time installations, the steps of
      the initial setup proceed directly into the steps of the
      installation. For assistance with product selection, see
      <a class="xref" href="installing.html#locate-products" title="Locating Products to Install">Locating Products to Install</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Full permissions are granted to the user executing MySQL Installer to all
        generated files, such as <code class="filename">my.ini</code>. This does
        not apply to files and directories for specific products, such
        as the MySQL server data directory in
        <code class="literal">%ProgramData%</code> that is owned by
        <code class="literal">SYSTEM</code>.
</p>
</div>
<p>
      Products installed and configured on a host follow a general
      pattern that might require your input during the various steps. If
      you attempt to install a product that is incompatible with the
      existing MySQL server version (or a version selected for upgrade),
      you are alerted about the possible mismatch.
    </p><p>
      MySQL Installer loads all selected products together using the following
      workflow:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><b>Product download. </b>
            If you installed the full (not web) MySQL Installer package, all
            <code class="filename">.msi</code> files were loaded to the
            <code class="filename">Product Cache</code> folder during the initial
            setup and are not downloaded again. Otherwise, click
            <span class="guibutton">Execute</span> to begin the download. The
            status of each product changes from
            <code class="literal">Downloading</code> to
            <code class="literal">Downloaded</code>.
          </p></li><li class="listitem"><p><b>Product installation. </b>
            The status of each product in the list changes from
            <code class="literal">Ready to Install</code>, to
            <code class="literal">Installing</code>, and lastly to
            <code class="literal">Complete</code>. During the process, click
            <span class="guilabel">Show Details</span> to view the installation
            actions.
          </p><p>
          If you cancel the installation at this point, the products are
          installed, but the server (if installed) is not yet
          configured. To restart the server configuration, open MySQL Installer
          from the Start menu and click the
          <span class="guilabel">Reconfigure</span> link next to the appropriate
          server in the dashboard.
        </p></li><li class="listitem"><p><b>Product configuration. </b>
            This step applies to MySQL Server, MySQL Router, and samples
            only. The status for each item in the list should indicate
            <code class="literal">Ready to Configure</code>.
          </p><p>
          Click <span class="guibutton">Next</span> to start the configuration
          wizard for all items in the list. The configuration options
          presented during this step are specific to the version of
          database or router that you selected to install.
        </p><p>
          Click <span class="guibutton">Execute</span> to begin applying the
          configuration options or click <span class="guibutton">Back</span>
          (repeatedly) to return to each configuration page. Click
          <span class="guibutton">Finish</span> to open the
          <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">MySQL Installer
          dashboard</a>.
        </p></li><li class="listitem"><p><b>Installation complete. </b>
            This step finalizes the installation for products that do
            not require configuration. It enables you to copy the log to
            a clipboard and to start certain applications, such as
            MySQL Workbench and MySQL Shell. Click
            <span class="guibutton">Finish</span> to open the
            <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">MySQL Installer
            dashboard</a>.
</p></li></ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a name="mysql-installer-workflow-server"></a>2.3.3.3.1 MySQL Server Configuration with MySQL Installer</h5>

</div>

</div>

</div>
<p>
        MySQL Installer performs the initial configuration of the MySQL server. For
        example:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For the MySQL 8.0 release series, a server can be configured
            to run as a standalone database, as a sandbox
            InnoDB cluster on a single host, or to create a production
            InnoDB cluster inside a local network (see
            <a class="xref" href="installing.html#mysql-installer-workflow-innodb-cluster" title="2.3.3.3.1.1 High Availability">Section 2.3.3.3.1.1, “High Availability”</a>).
          </p></li><li class="listitem"><p>
            It creates the configuration file
            (<code class="filename">my.ini</code>) that is used to configure the
            MySQL server. The values written to this file are influenced
            by choices you make during the installation process. Some
            definitions are host dependent. For example, query_cache is
            enabled if the host has fewer than three cores.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              Query cache was deprecated in MySQL 5.7 and removed in
              MySQL 8.0 (and later).
</p>
</div>
</li><li class="listitem"><p>
            By default, a Windows service for the MySQL server is added.
          </p></li><li class="listitem"><p>
            Provides default installation and data paths for MySQL
            server. For instructions on how to change the default paths,
            see <a class="xref" href="installing.html#mysql-installer-change-path-proc" title="2.3.3.2 Setting Alternative Server Paths with MySQL Installer">Section 2.3.3.2, “Setting Alternative Server Paths with MySQL Installer”</a>.
          </p></li><li class="listitem"><p>
            It can optionally create MySQL server user accounts with
            configurable permissions based on general roles, such as DB
            Administrator, DB Designer, and Backup Admin. It optionally
            creates a Windows user named <code class="literal">MysqlSys</code>
            with limited privileges, which would then run the MySQL
            Server.
          </p><p>
            User accounts may also be added and configured in
            MySQL Workbench.
          </p></li><li class="listitem"><p>
            Checking <span class="guilabel">Show Advanced Options</span> enables
            additional <span class="guilabel">Logging Options</span> to be set.
            This includes defining custom file paths for the error log,
            general log, slow query log (including the configuration of
            seconds it requires to execute a query), and the binary log.
</p></li></ul>
</div>
<p>
        During the configuration process, click
        <span class="guibutton">Next</span> to proceed to the next step or
        <span class="guibutton">Back</span> to return to the previous step.
        Click <span class="guibutton">Execute</span> at the final step to apply
        the server configuration.
      </p><p>
        The sections that follow describe the server configuration
        options that apply to MySQL server on Windows. The server
        version you installed will determine which steps and options you
        can configure. Configuring MySQL server may include some or all
        of the steps.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="mysql-installer-workflow-innodb-cluster"></a>2.3.3.3.1.1 High Availability</h6>
</div>

</div>

</div>
<p>
          MySQL Installer enables you to install, configure, and deploy MySQL
          Server as a standalone instance or as a member of a highly
          available cluster using MySQL Group Replication. In either
          case, MySQL Installer restricts the installation and configuration of the
          server (or servers) to the local Windows host computer.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              Standalone MySQL Server / Classic MySQL Replication
              (default)
            </p><p>
              Select this option to configure one MySQL instance to run
              as a standalone database server. This option is ideal if
              you intend to set up classic replication later and then to
              include this server in your custom solution. The remaining
              configuration steps are described in the sections that
              follow, starting with
              <a class="link" href="installing.html#server-type-network" title="2.3.3.3.1.2 Type and Networking">Type and
              Networking</a>.
            </p></li><li class="listitem"><p>
              InnoDB cluster
            </p><p>
              Select this option to create or extend an InnoDB cluster
              solution that is based on MySQL Group Replication (see
              <a class="xref" href="mysql-innodb-cluster-userguide.html#mysql-innodb-cluster-introduction" title="21.1 Introducing InnoDB Cluster">Section 21.1, “Introducing InnoDB Cluster”</a>). You
              can configure (or reconfigure) a minimum of three server
              instances to perform a basic setup as a test-only sandbox
              cluster on a single computer or to create a production
              cluster inside a local network.
            </p><p><b>InnoDB Cluster Log Verbosity Level. </b>
                This configuration step includes an adjustable log that
                captures information during the configuration of each
                server instance in the production or sandbox cluster.
                The values are: <code class="literal">MINIMAL</code>,
                <code class="literal">MEDIUM</code> (default), and
                <code class="literal">DEBUG</code>. If the cluster configuration
                fails, use the <span class="guilabel">Reconfigure</span> action
                from the <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">MySQL Installer
                dashboard</a> to restart the configuration and then
                set the verbosity level to <code class="literal">DEBUG</code> to
                gather additional information during your next attempt.
              </p><p>
              MySQL Installer provides the following configuration variations to
              deploy an InnoDB cluster:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  Set Up a Local Server Cluster for Testing Only
                </p><p>
                  Select <span class="guilabel">Create a Sandbox InnoDB cluster for
                  Testing</span> to enable this option. When
                  prompted, define the number of server sandbox
                  instances in the cluster, set a password for the
                  <code class="literal">root</code> user, and adjust the
                  InnoDB cluster log verbosity level as needed. For a
                  more detailed description of the configuration, see
                  <a class="xref" href="installing.html#mysql-installer-sandbox-innodb-cluster" title="Deploying a Sandbox InnoDB Cluster with MySQL Installer">Deploying a Sandbox InnoDB Cluster with MySQL Installer</a>.
                  This setup requires MySQL 5.7.17 or higher.
                </p></li><li class="listitem"><p>
                  Create or Join an InnoDB cluster
                </p><p>
                  To set up a highly available InnoDB cluster using
                  MySQL Installer, you must have a minimum of three computers on a
                  local network. If you require a more advanced setup,
                  use MySQL Shell to configure some or all of the
                  server instances in the cluster. For details about how
                  to perform a local-network cluster setup, see
                  <a class="link" href="installing.html#mysql-installer-create-innodb-cluster" title="Setting up InnoDB Cluster with MySQL Installer">Setting
                  up an InnoDB cluster with MySQL Installer</a>. This setup
                  requires MySQL 8.0.0 or higher.
</p></li></ul>
</div>
<p>
              InnoDB cluster was designed to operate with
              MySQL Shell, which enables you to perform advanced
              cluster administration, and MySQL Router to automate the
              connections made between client applications and server
              instances. Neither MySQL Shell nor MySQL Router are required
              to deploy a cluster on Windows using MySQL Installer.
</p></li></ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h6 class="title"><a name="mysql-installer-sandbox-innodb-cluster"></a>Deploying a Sandbox InnoDB Cluster with MySQL Installer</h6>
</div>

</div>

</div>
<p>
            A sandbox deployment includes multiple server sandbox
            instances that run together on the same computer. Because
            all server instances reside on the same computer, a sandbox
            cluster does not meet the requirements of a highly available
            solution. Instead, this deployment option simulates an
            environment from which you can explore the techniques
            associated with InnoDB cluster administration.
          </p><p>
            When you select <span class="guilabel">Create a Sandbox InnoDB cluster
            for Testing</span>, a follow-on step prompts you to
            select a cluster consisting of three, five, seven, or nine
            MySQL server instances. Unlike the other server setups
            provided by MySQL Installer, the sandbox deployment skips the usual
            server configuration steps (except Authentication Method).
            The resulting cluster, named
            <code class="literal">sandboxCluster</code>, is available on selected
            ports that are configured for you.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              MySQL Installer deletes ports 3310 to 3390 during the configuration,
              if those ports were set for the sandbox InnoDB cluster
              manually using MySQL Shell.
</p>
</div>
<p>
            Each sandbox instance is configured to run as a process (not
            a Windows service). You must start each instance in the
            sandbox cluster manually after restarting the computer.
          </p><p>
            After you create the test cluster, click the
            <span class="guilabel">Summary</span> tab to view the specific ports
            that apply to your cluster. To modify the number of server
            instances within the existing cluster or to adjust the
            logging level, use the <span class="guilabel">Reconfigure</span>
            quick action from the
            <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">MySQL Installer
            dashboard</a>.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
              MySQL Installer deletes all existing sandbox cluster data when the
              cluster is reconfigured or when the server instances
              within the sandbox cluster are upgraded.
</p>
</div>
<p>
            MySQL Installer stores all sandbox InnoDB cluster configuration
            entries in the <code class="filename">installer_config.xml</code>
            file. By default, MySQL Installer creates the sandbox instances in
            <code class="literal">%userprofile%\MySQL\mysql-sandboxes</code> on
            the local host.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h6 class="title"><a name="mysql-installer-create-innodb-cluster"></a>Setting up InnoDB Cluster with MySQL Installer</h6>
</div>

</div>

</div>
<p>
            To create a single InnoDB cluster, select <span class="guilabel">InnoDB
            Cluster</span> as the High Availability option and then
            select <span class="guilabel">Create a New InnoDB Cluster</span>.
            Adjust the log verbosity level (as needed), and click
            <span class="guibutton">Next</span> to configure the first server
            instance. This setup process involves installing and running
            MySQL Installer on multiple computers.
          </p><p>
            Define the first server instance (or seed) by providing the
            following configuration information:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                <span class="guilabel">InnoDB Cluster Name:</span>
              </p><p>
                The default cluster name is
                <code class="literal">myCluster</code>. If you intend to configure
                multiple clusters, replace the default name with one
                that is meaningful within your solution. Alphanumeric
                characters, spaces, and underscore
                (<code class="literal">_</code>) characters are valid for this
                field. The limit is 40 characters.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Cluster Admin User Name:</span>
              </p><p>
                The default cluster administrator name is
                <code class="literal">ic</code>. You can reuse the same MySQL
                administrative account across multiple clusters. You
                will be prompted for this account name (and password)
                later when you configure other server instances to join
                the cluster. The limit is 32 characters.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Cluster Admin Password:</span>
              </p><p>
                Enter a password for the cluster administrator account
                (minimum length is four characters). MySQL Installer will evaluate
                the strength of the MySQL password as you type. Use the
                <span class="guilabel">Repeat Password</span> field to confirm
                the password.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Host Address:</span>
              </p><p>
                Select the host name or IP address of the local host
                from the list. When joining additional server instances
                to the cluster, you will be prompted to identify the
                seed instance by the host name or IP address.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Server ID:</span>
              </p><p>
                The default value is <code class="literal">1</code>. This
                identifier is required to record the events of a server
                instance in the binary log. The ID of each server
                instance within a cluster must be unique; however, you
                can reuse the same number in a different cluster. The
                server ID you specify in this field also appears later
                in Advanced Options step. If you change the value in
                Advanced Option, the number is changed for the
                InnoDB cluster Setup too.
</p></li></ul>
</div>
<p>
            Click <span class="guibutton">Next</span> and then complete the
            remaining configuration steps, which are described in the
            sections that follow, starting with
            <a class="link" href="installing.html#server-type-network" title="2.3.3.3.1.2 Type and Networking">Type and
            Networking</a>. After the seed instance is added and the
            cluster is created, it requires more instances for full
            tolerance. At this point, the status is
            <code class="literal">OK_NO_TOLERANCE</code>.
          </p><p>
            To add the second and third server instances to the cluster,
            you must use a separate computer inside the local network
            for each. Some of the configuration details of the seed
            instance are required to complete the join operation.
          </p><p>
            After you start MySQL Installer and install the server instance on the
            next computer, begin the configuration by selecting
            <span class="guilabel">InnoDB Cluster</span> as the High Availability
            option and then select <span class="guilabel">Add Local MySQL Server
            Instance to an InnoDB Cluster</span>. Adjust the
            <span class="guilabel">InnoDB Cluster Log Verbosity Level</span> (as
            needed) and then click <span class="guilabel">Next</span>.
          </p><p>
            Define the joining server instance by providing the
            following configuration information:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                <span class="guilabel">Seed Instance Address:</span>
              </p><p>
                Enter the host name or IP address of the computer that
                hosts the seed instance.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Seed Instance Port:</span>
              </p><p>
                The default value is <code class="literal">3306</code>, which is
                the port for classic MySQL. Use the same TCP port that
                you configured for the seed instance.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Cluster Admin User Name:</span>
              </p><p>
                The default cluster administrator name is
                <code class="literal">ic</code>. If you assigned a different name
                when you configured the seed instance, enter the
                alternative cluster administrator name.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Cluster Admin Password:</span>
              </p><p>
                Enter the password assigned to the cluster administrator
                account.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Host Address:</span>
              </p><p>
                Select the host name or IP address of the local host
                from the list.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Server ID:</span>
              </p><p>
                The default value is <code class="literal">1</code>. This
                identifier is required to record the events of a server
                instance in the binary log. The ID of each server
                instance within a cluster must be unique; however, you
                can reuse the same number in a different cluster. The
                server ID you specify in this field also appears later
                in Advanced Options step. If you change the value in
                Advanced Option, the number is changed for the
                InnoDB cluster Setup too.
              </p></li><li class="listitem"><p>
                <span class="guibutton">Test Connection</span>
              </p><p>
                Use this button to verify the connection between the
                local server instance and the seed instance defined for
                the cluster. A valid connection is required to proceed.
</p></li></ul>
</div>
<p>
            Click <span class="guibutton">Next</span> and then complete the
            remaining configuration steps, which are described in the
            sections that follow, starting with
            <a class="link" href="installing.html#server-type-network" title="2.3.3.3.1.2 Type and Networking">Type and
            Networking</a>.
          </p><p>
            With one seed instance and a second server instance in the
            cluster, the status is <code class="literal">OK_NO_TOLERANCE</code>.
            After you add the third server instance, the status is
            <code class="literal">OK</code>, which indicates that the cluster now
            is tolerant to the failure of one instance.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-type-network"></a>2.3.3.3.1.2 Type and Networking</h6>
</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              Server Configuration Type
            </p><p>
              Choose the MySQL server configuration type that describes
              your setup. This setting defines the amount of system
              resources (memory) to assign to your MySQL server
              instance.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  <span class="bold"><strong>Development</strong></span>: A
                  computer that hosts many other applications, and
                  typically this is your personal workstation. This
                  setting configures MySQL to use the least amount of
                  memory.
                </p></li><li class="listitem"><p>
                  <span class="bold"><strong>Server</strong></span>: Several other
                  applications are expected to run on this computer,
                  such as a web server. The Server setting configures
                  MySQL to use a medium amount of memory.
                </p></li><li class="listitem"><p>
                  <span class="bold"><strong>Dedicated</strong></span>: A computer
                  that is dedicated to running the MySQL server. Because
                  no other major applications run on this server, this
                  setting configures MySQL to use the majority of
                  available memory.
</p></li></ul>
</div>
</li><li class="listitem"><p>
              Connectivity
            </p><p>
              Connectivity options control how the connection to MySQL
              is made. Options include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  <span class="guilabel">TCP/IP</span>: This option is selected
                  by default. You may disable TCP/IP Networking to
                  permit local host connections only. With the TCP/IP
                  connection option selected, you can modify the
                  following items:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; "><li class="listitem"><p>
                      <span class="guilabel">Port</span> for the classic MySQL
                      protocol connections. The default value is
                      <code class="literal">3306</code>.
                    </p></li><li class="listitem"><p>
                      <span class="guilabel">X Protocol Port</span> shown when
                      configuring MySQL 8.0 server only.
                    </p></li><li class="listitem"><p>
                      <span class="guilabel">Open Windows Firewall port for network
                      access</span>, which is selected by default
                      for TCP/IP.
</p></li></ul>
</div>
<p>
                  If a port number is in use already, you will see the
                  information icon (<span class="inlinemediaobject"><img src="images/mi-info-symbol.png" align="middle" width="22" height="20"></span>) next to the default value and
                  <span class="guibutton">Next</span> is disabled until you
                  provide a new port number.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Named Pipe</span>: Enable and define the
                  pipe name, similar to setting the
                  <a class="link" href="server-administration.html#sysvar_named_pipe"><code class="literal">named_pipe</code></a> system
                  variable. The default name is
                  <code class="literal">MySQL</code>.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Shared Memory</span>: Enable and define
                  the memory name, similar to setting the
                  <a class="link" href="server-administration.html#sysvar_shared_memory"><code class="literal">shared_memory</code></a> system
                  variable. The default name is
                  <code class="literal">MySQL</code>.
</p></li></ul>
</div>
</li><li class="listitem"><p>
              Advanced Configuration
            </p><p>
              Check <span class="guilabel">Show Advanced and Logging
              Options</span> to set custom logging and advanced
              options in later steps. The Logging Options step enables
              you to define custom file paths for the error log, general
              log, slow query log (including the configuration of
              seconds it requires to execute a query), and the binary
              log. The Advanced Options step enables you to set the
              unique server ID required when binary logging is enabled
              in a replication topology.
            </p></li><li class="listitem"><p>
              MySQL Enterprise Firewall (Enterprise Edition only)
            </p><p>
              The <span class="guilabel">Enable MySQL Enterprise Firewall</span>
              check box is deselected by default. Select this option to
              enable a security whitelist that offers protection against
              certain types of attacks. Additional post-installation
              configuration is required (see
              <a class="xref" href="security.html#firewall" title="6.4.7 MySQL Enterprise Firewall">Section 6.4.7, “MySQL Enterprise Firewall”</a>).
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
                There is an issue for MySQL 8.0.19 that prevents the
                server from starting if MySQL Enterprise Firewall is selected during the
                server configuration steps. If the server startup
                operation fails, click <span class="guibutton">Cancel</span> to
                end the configuration process and return to the
                dashboard. You must uninstall the server.
              </p><p>
                The workaround is to run MySQL Installer without MySQL Enterprise Firewall selected.
                (That is, do not select the <span class="guilabel">Enable MySQL
                Enterprise Firewall</span> check box.) Then install
                MySQL Enterprise Firewall afterward using the instructions for manual
                installation (see
                <a class="xref" href="security.html#firewall-installation" title="6.4.7.2 Installing or Uninstalling MySQL Enterprise Firewall">Section 6.4.7.2, “Installing or Uninstalling MySQL Enterprise Firewall”</a>).
</p>
</div>
</li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-authentication-method"></a>2.3.3.3.1.3 Authentication Method</h6>
</div>

</div>

</div>
<p>
          The <span class="guilabel">Authentication Method</span> step is visible
          only during the installation or upgrade of MySQL 8.0.4 or
          higher. It introduces a choice between two server-side
          authentication options. The MySQL user accounts that you
          create in the next step will use the authentication method
          that you select in this step.
        </p><p>
          MySQL 8.0 connectors and community drivers that use
          <code class="literal">libmysqlclient</code> 8.0 now support the
          <code class="literal">mysql_native_password</code> default
          authentication plugin. However, if you are unable to update
          your clients and applications to support this new
          authentication method, you can configure the MySQL server to
          use <code class="literal">mysql_native_password</code> for legacy
          authentication. For more information about the implications of
          this change, see
          <a class="xref" href="installing.html#upgrade-caching-sha2-password" title="caching_sha2_password as the Preferred Authentication Plugin">caching_sha2_password as the Preferred Authentication Plugin</a>.
        </p><p>
          If you are installing or upgrading to MySQL 8.0.4 or higher,
          select one of the following authentication methods:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              Use Strong Password Encryption for Authentication
              (RECOMMENDED)
            </p><p>
              MySQL 8.0 supports a new authentication based on improved,
              stronger SHA256-based password methods. It is recommended
              that all new MySQL server installations use this method
              going forward.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
                The <code class="literal">caching_sha2_password</code>
                authentication plugin on the server requires new
                versions of connectors and clients, which add support
                for the new MySQL 8.0 default authentication.
</p>
</div>
</li><li class="listitem"><p>
              Use Legacy Authentication Method (Retain MySQL 5.x
              Compatibility)
            </p><p>
              Using the old MySQL 5.x legacy authentication method
              should be considered only in the following cases:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  Applications cannot be updated to use MySQL 8.0
                  connectors and drivers.
                </p></li><li class="listitem"><p>
                  Recompilation of an existing application is not
                  feasible.
                </p></li><li class="listitem"><p>
                  An updated, language-specific connector or driver is
                  not available yet.
</p></li></ul>
</div>
</li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-accounts-roles"></a>2.3.3.3.1.4 Accounts and Roles</h6>
</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              Root Account Password
            </p><p>
              Assigning a root password is required and you will be
              asked for it when performing other MySQL Installer operations.
              Password strength is evaluated when you repeat the
              password in the box provided. For descriptive information
              regarding password requirements or status, move your mouse
              pointer over the information icon (<span class="inlinemediaobject"><img src="images/mi-info-symbol.png" align="middle" width="22" height="20"></span>) when it appears.
            </p></li><li class="listitem"><p>
              MySQL User Accounts (Optional)
            </p><p>
              Click <span class="guibutton">Add User</span> or <span class="guibutton">Edit
              User</span> to create or modify MySQL user accounts
              with predefined roles. Next, enter the required account
              credentials:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  <span class="guilabel">User Name:</span> MySQL user names can
                  be up to 32 characters long.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Host:</span> Select
                  <code class="literal">localhost</code> for local connections
                  only or <code class="literal">&lt;All Hosts (%)&gt;</code> when
                  remote connections to the server are required.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Role:</span> Each predefined role, such
                  as <code class="literal">DB Admin</code>, is configured with its
                  own set of privileges. For example, the <code class="literal">DB
                  Admin</code> role has more privileges than the
                  <code class="literal">DB Designer</code> role. The
                  <span class="guilabel">Role</span> drop-down list contains a
                  description of each role.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Password:</span> Password strength
                  assessment is performed while you type the password.
                  Passwords must be confirmed. MySQL permits a blank or
                  empty password (considered to be insecure).
</p></li></ul>
</div>
<p><b>MySQL Installer Commercial Release Only: </b>
                MySQL Enterprise Edition for Windows, a commercial
                product, also supports an authentication method that
                performs external authentication on Windows. Accounts
                authenticated by the Windows operating system can access
                the MySQL server without providing an additional
                password.
              </p><p>
              To create a new MySQL account that uses Windows
              authentication, enter the user name and then select a
              value for <span class="guilabel">Host</span> and
              <span class="guilabel">Role</span>. Click
              <span class="guilabel">Windows</span> authentication to enable the
              <code class="literal">authentication_windows</code> plugin. In the
              Windows Security Tokens area, enter a token for each
              Windows user (or group) who can authenticate with the
              MySQL user name. MySQL accounts can include security
              tokens for both local Windows users and Windows users that
              belong to a domain. Multiple security tokens are separated
              by the semicolon character (<code class="literal">;</code>) and use
              the following format for local and domain accounts:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  Local account
                </p><p>
                  Enter the simple Windows user name as the security
                  token for each local user or group; for example,
                  <strong class="userinput"><code>finley;jeffrey;admin</code></strong>.
                </p></li><li class="listitem"><p>
                  Domain account
                </p><p>
                  Use standard Windows syntax
                  (<em class="replaceable"><code>domain</code></em><code class="literal">\</code><em class="replaceable"><code>domainuser</code></em>)
                  or MySQL syntax
                  (<em class="replaceable"><code>domain</code></em><code class="literal">\\</code><em class="replaceable"><code>domainuser</code></em>)
                  to enter Windows domain users and groups.
                </p><p>
                  For domain accounts, you may need to use the
                  credentials of an administrator within the domain if
                  the account running MySQL Installer lacks the permissions to
                  query the Active Directory. If this is the case,
                  select <span class="guilabel">Validate Active Directory users
                  with</span> to activate the domain administrator
                  credentials.
</p></li></ul>
</div>
<p>
              Windows authentication permits you to test all of the
              security tokens each time you add or modify a token. Click
              <span class="guibutton">Test Security Tokens</span> to validate
              (or revalidate) each token. Invalid tokens generate a
              descriptive error message along with a red
              <code class="literal">X</code> icon and red token text. When all
              tokens resolve as valid (green text without an
              <code class="literal">X</code> icon), you can click
              <span class="guibutton">OK</span> to save the changes.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-windows-service"></a>2.3.3.3.1.5 Windows Service</h6>
</div>

</div>

</div>
<p>
          On the Windows platform, MySQL server can run as a named
          service managed by the operating system and be configured to
          start up automatically when Windows starts. Alternatively, you
          can configure MySQL server to run as an executable program
          that requires manual configuration.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              <span class="guilabel">Configure MySQL server as a Windows
              service</span> (Selected by default.)
            </p><p>
              When the default configuration option is selected, you can
              also select the following:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  <span class="guilabel">Start the MySQL Server at System
                  Startup</span>
                </p><p>
                  When selected (default), the service startup type is
                  set to Automatic; otherwise, the startup type is set
                  to Manual.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Run Windows Service as</span>
                </p><p>
                  When <span class="guilabel">Standard System Account</span> is
                  selected (default), the service logs on as Network
                  Service.
                </p><p>
                  The <span class="guilabel">Custom User</span> option must have
                  privileges to log on to Microsoft Windows as a
                  service. The <span class="guibutton">Next</span> button will
                  be disabled until this user is configured with the
                  required privileges.
                </p><p>
                  A custom user account is configured in Windows by
                  searching for "local security policy" in the Start
                  menu. In the Local Security Policy window, select
                  <span class="guilabel">Local Policies</span>, <span class="guilabel">User
                  Rights Assignment</span>, and then <span class="guilabel">Log
                  On As A Service</span> to open the property
                  dialog. Click <span class="guibutton">Add User or Group</span>
                  to add the custom user and then click
                  <span class="guibutton">OK</span> in each dialog to save the
                  changes.
</p></li></ul>
</div>
</li><li class="listitem"><p>
              Deselect the Windows Service option
            </p><p>
              
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-logging-options"></a>2.3.3.3.1.6 Logging Options</h6>
</div>

</div>

</div>
<p>
          This step is available if the <span class="guilabel">Show Advanced
          Configuration</span> check box was selected during the
          <span class="guilabel">Type and Networking</span> step. To enable this
          step now, click <span class="guibutton">Back</span> to return to the
          <span class="guilabel">Type and Networking</span> step and select the
          check box.
        </p><p>
          Advanced configuration options are related to the following
          MySQL log files:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              <a class="link" href="server-administration.html#error-log" title="5.4.2 The Error Log">Error Log</a>
            </p></li><li class="listitem"><p>
              <a class="link" href="server-administration.html#query-log" title="5.4.3 The General Query Log">General Log</a>
            </p></li><li class="listitem"><p>
              <a class="link" href="server-administration.html#slow-query-log" title="5.4.5 The Slow Query Log">Slow Query Log</a>
            </p></li><li class="listitem"><p>
              <a class="link" href="server-administration.html#binary-log" title="5.4.4 The Binary Log">Bin Log</a>
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
            The binary log is enabled by default for MySQL 5.7 and
            higher.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-advanced-options"></a>2.3.3.3.1.7 Advanced Options</h6>
</div>

</div>

</div>
<p>
          This step is available if the <span class="guilabel">Show Advanced
          Configuration</span> check box was selected during the
          <span class="guilabel">Type and Networking</span> step. To enable this
          step now, click <span class="guibutton">Back</span> to return to the
          <span class="guilabel">Type and Networking</span> step and select the
          check box.
        </p><p>
          The advanced-configuration options include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              <span class="guilabel">Server ID</span>
            </p><p>
              Set the unique identifier used in a replication topology.
              If binary logging is enabled, you must specify a server
              ID. The default ID value depends on the server version.
              For more information, see the description of the
              <a class="link" href="replication.html#sysvar_server_id"><code class="literal">server_id</code></a> system
              variable.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Tip
</div>
<p>
                If you specified an ID for a server instance of an
                InnoDB cluster, then MySQL Installer adjusts the ID (shown on
                this page) to match the previous identifier.
</p>
</div>
</li><li class="listitem"><p>
              <span class="guilabel">Table Names Case</span>
            </p><p>
              You can set the following options during the initial and
              subsequent configuration the server. For the MySQL 8.0
              release series, these options apply only to the initial
              configuration of the server.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  Lower Case
                </p><p>
                  Sets the
                  <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
                  option value to 1 (default), in which table names are
                  stored in lowercase on disk and comparisons are not
                  case-sensitive.
                </p></li><li class="listitem"><p>
                  Preserve Given Case
                </p><p>
                  Sets the
                  <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
                  option value to 2, in which table names are stored as
                  given but compared in lowercase.
</p></li></ul>
</div>
</li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h6 class="title"><a name="server-apply-config"></a>2.3.3.3.1.8 Apply Server Configuration</h6>
</div>

</div>

</div>
<p>
          All configuration settings are applied to the MySQL server
          when you click <span class="guibutton">Execute</span>. Use the
          <span class="guilabel">Configuration Steps</span> tab to follow the
          progress of each action; the icon for each toggles from white
          to green (with a check mark) on success. Otherwise, the
          process stops and displays an error message if an individual
          action times out. Click the <span class="guilabel">Log</span> tab to
          view the log.
        </p><p>
          When the installation completes successfully and you click
          <span class="guibutton">Finish</span>, MySQL Installer and the installed MySQL
          products are added to the Microsoft Windows Start menu under
          the <code class="literal">MySQL</code> group. Opening MySQL Installer loads the
          <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">dashboard</a>
          where installed MySQL products are listed and other MySQL Installer
          operations are available.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a name="mysql-installer-workflow-nonserver-products"></a>2.3.3.3.2 MySQL Router Configuration with MySQL Installer</h5>

</div>

</div>

</div>
<p>
        MySQL Installer downloads and installs a suite of tools for developing and
        managing business-critical applications on Windows. The suite
        consist of applications, connectors, documentation, and samples.
      </p><p>
        During the <a class="link" href="installing.html#mysql-installer-setup" title="2.3.3.1 MySQL Installer Initial Setup">initial
        setup</a>, choose any predetermined setup type, except
        <code class="literal">Server only</code>, to install the latest GA version
        of the tools. Use the <code class="literal">Custom</code> setup type to
        install an individual tool or specific version. If MySQL Installer is
        installed on the host already, use the <span class="guilabel">Add</span>
        operation to select and install tools from the MySQL Installer dashboard.
</p>
<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h6 class="title"><a name="windows-applications-router"></a>MySQL Router Configuration</h6>
</div>

</div>

</div>
<p>
          MySQL Installer provides a configuration wizard that can bootstrap an
          installed instance of MySQL Router 8.0 or later to route traffic
          between MySQL applications and an InnoDB cluster. When
          configured, MySQL Router runs as a local Windows service. For
          detailed information about using MySQL Router with an
          InnoDB cluster, see
          <a class="ulink" href="https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-innodb-cluster.html" target="_top">Routing for MySQL InnoDB cluster</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            You are prompted to configure MySQL Router after the initial
            installation and when you reconfigure an installed router
            explicitly. In contrast, the upgrade operation does not
            require or prompt you to configure the upgraded product.
</p>
</div>
<p>
          To configure MySQL Router, do the following:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
              Set up InnoDB cluster. For instructions on how to
              configure a sandbox InnoDB cluster on the local host using
              MySQL Installer, see
              <a class="xref" href="installing.html#mysql-installer-workflow-innodb-cluster" title="2.3.3.3.1.1 High Availability">Section 2.3.3.3.1.1, “High Availability”</a>.
            </p><p>
              For general InnoDB cluster information, see
              <a class="xref" href="mysql-innodb-cluster-userguide.html" title="Chapter 21 InnoDB Cluster">Chapter 21, <i>InnoDB Cluster</i></a>.
            </p></li><li class="listitem"><p>
              Using MySQL Installer, download and install the MySQL Router application.
              After the installation finishes, the configuration wizard
              prompts you for information. Select the
              <span class="guilabel">Configure MySQL Router for
              InnoDB cluster</span> check box to begin the
              configuration and provide the following configuration
              values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                  <span class="guilabel">Hostname:</span> Host name of the
                  primary (seed) server in the InnoDB cluster
                  (<code class="literal">localhost</code> by default).
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Port:</span> The port number of the
                  primary (seed) server in the InnoDB cluster
                  (<code class="literal">3310</code> by default).
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Management User:</span> An
                  administrative user with root-level privileges.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Password:</span> The password for the
                  management user.
                </p></li><li class="listitem"><p>
                  <span class="guilabel">Classic MySQL protocol connections to
                  InnoDB cluster</span>
                </p><p>
                  <span class="guilabel">Read/Write:</span> Set the first base
                  port number to one that is unused (between 80 and
                  65532) and the wizard will select the remaining ports
                  for you.
                </p><p>
                  The figure that follows shows an example of the
                  MySQL Router configuration page, with the first base port
                  number specified as 6446 and the remaining ports set
                  by the wizard as 6447, 6448, and 6449.
</p></li></ul>
</div>

<div class="figure">
<a name="mysql-installer-router-config"></a><p class="title"><b>Figure 2.10 MySQL Router Configuration</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mi-router-config.png" width="541" height="381" alt="Content is described in the surrounding text.">
</div>

</div>

</div>
<br class="figure-break"></li><li class="listitem"><p>
              Click <span class="guibutton">Next</span> and then
              <span class="guibutton">Execute</span> to apply the configuration.
              Click <span class="guibutton">Finish</span> to close MySQL Installer or
              return to the
              <a class="link" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">MySQL Installer
              dashboard</a>.
</p></li></ol>
</div>
<p>
          After installing a production cluster with MySQL Router, the root
          account only exists in the user table as
          <code class="literal">root@localhost</code> (local), instead of
          <code class="literal">root@%</code> (remote). Regardless of where the
          router or client are located, even if both are located on the
          same host as the seed server, any connection that passes
          through the router is viewed by server as being remote, not
          local. As a result, a connection made to the server using the
          local host (see the example that follows), does not
          authenticate.
        </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>\c root@localhost:6446</code></strong>
</pre>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="mysql-installer-catalog-dashboard"></a>2.3.3.4 MySQL Installer Product Catalog and Dashboard</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#windows-product-catalog" title="Product Catalog">Product Catalog</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#windows-product-dashboard" title="MySQL Installer Dashboard">MySQL Installer Dashboard</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#locate-products" title="Locating Products to Install">Locating Products to Install</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-mysql-installer" title="Upgrading MySQL Installer">Upgrading MySQL Installer</a></p></li></ul>
</div>
<p>
      This section describes the MySQL Installer product catalog and the dashboard.
</p>
<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h5 class="title"><a name="windows-product-catalog"></a>Product Catalog</h5>
</div>
</div>
</div>
<p>
        The product catalog stores the complete list of released MySQL
        products for Microsoft Windows that are available to download
        from <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">MySQL Downloads</a>.
        By default, and when an Internet connection is present, MySQL Installer
        updates the catalog daily. You can also update the catalog
        manually from the dashboard (described later).
      </p><p>
        An up-to-date catalog performs the following actions:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Populates the <span class="guilabel">Available Products</span> pane
            of the Select Products and Features step. This step appears
            when you select:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                The <code class="literal">Custom</code> setup type during the
                <a class="link" href="installing.html#mysql-installer-setup" title="2.3.3.1 MySQL Installer Initial Setup">initial
                setup</a>.
              </p></li><li class="listitem"><p>
                The <span class="guilabel">Add</span> operation from the
                dashboard.
</p></li></ul>
</div>
</li><li class="listitem"><p>
            Identifies when product updates are available for the
            installed products listed in the dashboard.
</p></li></ul>
</div>
<p>
        The catalog includes all development releases (Pre-Release),
        general releases (Current GA), and minor releases (Other
        Releases). Products in the catalog will vary somewhat, depending
        on the MySQL Installer release that you download.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title"><a name="windows-product-dashboard"></a>MySQL Installer Dashboard</h5>

</div>

</div>

</div>
<p>
        The MySQL Installer dashboard is the default view that you see when you
        start MySQL Installer after the
        <a class="link" href="installing.html#mysql-installer-setup" title="2.3.3.1 MySQL Installer Initial Setup">initial setup</a>
        finishes. If you closed MySQL Installer before the setup was finished, MySQL Installer
        resumes the initial setup before it displays the dashboard.
</p>
<div class="figure">
<a name="mysql-installer-dashboard-fig"></a><p class="title"><b>Figure 2.11 MySQL Installer Dashboard Elements</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mi-dashboard-annotated.png" width="571" height="396" alt="Content is described in the surrounding text.">
</div>

</div>

</div>
<br class="figure-break"><h6><a name="windows-product-dashboard-elements"></a>Description of MySQL Installer Dashboard Elements</h6>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            MySQL Installer dashboard operations provide a variety of actions that
            apply to installed products or products listed in the
            catalog. To initiate the following operations, first click
            the operation link and then select the product or products
            to manage:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="mysql-installer-alter-add"></a>
                <span class="guilabel">Add</span>: This operation opens the
                Select Products and Features page. From there, you can
                filter the product in the product catalog, select one or
                more products to download (as needed), and begin the
                installation. For hints about using the filter, see
                <a class="xref" href="installing.html#locate-products" title="Locating Products to Install">Locating Products to Install</a>.
              </p></li><li class="listitem"><p><a name="mysql-installer-alter-modify"></a>
                <span class="guilabel">Modify</span>: Use this operation to add
                or remove the features associated with installed
                products. Features that you can modify vary in
                complexity by product. When the <span class="guilabel">Program
                Shortcut</span> check box is selected, the product
                appears in the Start menu under the
                <code class="literal">MySQL</code> group.
              </p></li><li class="listitem"><p><a name="mysql-installer-alter-upgrade"></a>
                <span class="guilabel">Upgrade</span>: This operation loads the
                Select Products to Upgrade page and populates it with
                all the upgrade candidates. An installed product can
                have more than one upgrade version and requires a
                current product catalog.
              </p><p>
                <span class="bold"><strong> Important server upgrade
                conditions:</strong></span>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                    MySQL Installer does not permit server upgrades between major
                    release versions or minor release versions, but does
                    permit upgrades within a release series, such as an
                    upgrade from 5.7.18 to 5.7.19.
                  </p></li><li class="listitem"><p>
                    Upgrades between milestone releases (or from a
                    milestone release to a GA release) are not
                    supported. Significant development changes take
                    place in milestone releases and you may encounter
                    compatibility issues or problems starting the
                    server.
                  </p></li><li class="listitem"><p>
                    For upgrades to MySQL 8.0.16 server and higher, a
                    check box enables you to skip the upgrade check and
                    process for system tables, while checking and
                    processing data dictionary tables normally. MySQL Installer
                    does not prompt you with the check box when the
                    previous server upgrade was skipped or when the
                    server was configured as a sandbox InnoDB cluster.
                    This behavior represents a change in how MySQL
                    Server performs an upgrade (see
                    <a class="xref" href="installing.html#upgrading-what-is-upgraded" title="2.11.3 What the MySQL Upgrade Process Upgrades">Section 2.11.3, “What the MySQL Upgrade Process Upgrades”</a>) and it
                    alters the sequence of steps that MySQL Installer applies to
                    the configuration process.
                  </p><p>
                    If you select <span class="guilabel">Skip system tables upgrade
                    check and process. (Not recommended)</span>,
                    MySQL Installer starts the upgraded server with the
                    <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a>
                    server option, which upgrades the data dictionary
                    only. If you stop and then restart the server
                    without the
                    <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a>
                    option, the server upgrades the system tables
                    automatically, if needed.
                  </p><p>
                    The following information appears in the
                    <span class="guilabel">Log</span> tab and log file after the
                    upgrade configuration (with system tables skipped)
                    is complete:
                  </p><pre data-lang="none" class="programlisting">WARNING: The system tables upgrade was skipped after upgrading MySQL Server. The 
server will be started now with the --upgrade=MINIMAL option, but then each 
time the server is started it will attempt to upgrade the system tables, unless 
you modify the Windows service (command line) to add --upgrade=MINIMAL to bypass 
the upgrade.

FOR THE BEST RESULTS: Run mysqld.exe --upgrade=FORCE on the command line to upgrade
the system tables manually.</pre></li></ul>
</div>
<p>
                To choose a new product version:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="a"><li class="listitem"><p>
                    Click <span class="guilabel">Upgrade</span>. Confirm that the
                    check box next to product name in the
                    <span class="guilabel">Upgradeable Products</span> pane has a
                    check mark. Deselect the products that you do not
                    intend to upgrade at this time.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
                      For server milestone releases in the same release
                      series, MySQL Installer deselects the server upgrade and
                      displays a warning to indicate that the upgrade is
                      not supported, identifies the risks of continuing,
                      and provides a summary of the steps to perform a
                      logical upgrade manually. You can reselect server
                      upgrade at your own risk. For instructions on how
                      to perform a logical upgrade with a milestone
                      release, see
                      <a class="xref" href="installing.html#upgrade-procedure-logical" title="Logical Upgrade">Logical Upgrade</a>.
</p>
</div>
</li><li class="listitem"><p>
                    Click a product in the list to highlight it. This
                    action populates the <span class="guilabel">Upgradeable
                    Versions</span> pane with the details of each
                    available version for the selected product: version
                    number, published date, and a
                    <code class="literal">Changes</code> link to open the release
                    notes for that version.
</p></li></ol>
</div>
<p>
                MySQL Installer upgrades all of the selected products in one
                action. Click <span class="guibutton">Show Details</span> to
                view the actions performed by MySQL Installer.
              </p></li><li class="listitem"><p><a name="mysql-installer-remove"></a>
                <span class="guilabel">Remove</span>: This operation opens the
                Remove Products page and populates it with the MySQL
                products installed on the host. Select the MySQL
                products you want to remove (uninstall) and then click
                <span class="guibutton">Execute</span> to begin the removal
                process. During the operation, an indicator shows the
                number of steps that are executed as a percentage of all
                steps.
              </p><p>
                To select products to remove, do one of the following:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                    Select the check box for one or more products.
                  </p></li><li class="listitem"><p>
                    Select the <span class="guilabel">Product</span> check box to
                    select all products.
</p></li></ul>
</div>
<p>
                To remove a local MySQL server:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="a"><li class="listitem"><p>
                    Determine whether the local data directory should be
                    removed. If you retain the data directory, another
                    server installation can reuse the data. This option
                    is enabled by default (removes the data directory).
                  </p></li><li class="listitem"><p>
                    If the local server is a member of an
                    InnoDB cluster, reconfigure the cluster as
                    follows:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="i"><li class="listitem"><p>
                        Type the administrator password for the cluster
                        affected when the local server is removed and
                        then click <span class="guibutton">Test
                        Connection</span> to verify the
                        credentials. MySQL Installer can perform the following
                        actions, depending on the configuration of the
                        existing cluster:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                            If the local server is a seed instance and
                            the number of instances in the cluster is
                            one, dissolve the cluster when you remove
                            the local server.
                          </p></li><li class="listitem"><p>
                            If the local server is a seed instance and
                            the number of instances in the cluster is
                            greater than one, remove the instance from
                            the cluster or dissolve the cluster when you
                            remove the local server.
                          </p></li><li class="listitem"><p>
                            If the local server is a slave instance
                            within the cluster and the number of
                            instances in the cluster is greater than
                            two, remove the local instance from the
                            cluster. (A single slave instance within a
                            cluster reverts to a seed instance
                            automatically.)
                          </p></li><li class="listitem"><p>
                            If the local server is configured as a
                            sandbox InnoDB cluster, remove all
                            instances created for the sandbox server
                            installation.
</p></li></ul>
</div>
</li><li class="listitem"><p>
                        When prompted, do one of the following:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                            Select an action to apply to the cluster and
                            click <span class="guibutton">Next</span>.
                          </p></li><li class="listitem"><p>
                            Click <span class="guibutton">Next</span> without
                            selecting an action. In most cases,
                            MySQL Group Replication can manage the
                            cluster when the local server becomes
                            unavailable. A warning message reminds you
                            that skipping the step may result in an
                            inconsistent InnoDB cluster configuration.
</p></li></ul>
</div>
</li></ol>
</div>
</li><li class="listitem"><p>
                    Click <span class="guibutton">Execute</span> to begin
                    uninstalling the local server. Note that all
                    products that you selected to remove are also
                    uninstalled at this time.
                  </p></li><li class="listitem"><p>
                    (Optional) Click the <span class="guilabel">Log</span> tab to
                    display the current actions performed by MySQL Installer.
</p></li></ol>
</div>
</li></ul>
</div>
</li><li class="listitem"><p><a name="mysql-installer-alter-reconfigure"></a>
            The <span class="guilabel">Reconfigure</span> link in the Quick
            Action column next to each installed server loads the
            current configuration values for the server and then cycles
            through all configuration steps enabling you to change the
            options and values. You must provide credentials with root
            privileges to reconfigure these items. Click the
            <span class="guilabel">Log</span> tab to show the output of each
            configuration step performed by MySQL Installer.
          </p><p>
            On completion, MySQL Installer stops the server, applies the
            configuration changes, and restarts the server for you. For
            a description of each configuration option, see
            <a class="xref" href="installing.html#mysql-installer-workflow-server" title="2.3.3.3.1 MySQL Server Configuration with MySQL Installer">Section 2.3.3.3.1, “MySQL Server Configuration with MySQL Installer”</a>. Installed
            <code class="literal">Samples and Examples</code> associated with a
            specific MySQL server version can be also be reconfigured to
            apply new feature settings, if any.
          </p></li><li class="listitem"><p><a name="mysql-installer-catalog"></a>
            The <span class="guilabel">Catalog</span> link enables you to
            download the latest catalog of MySQL products manually and
            then to integrate those product changes with MySQL Installer. The
            catalog-download action does not perform an upgrade of the
            products already installed on the host. Instead, it returns
            to the dashboard and displays an arrow icon in the Version
            column for each installed product that has a newer version.
            Use the <span class="guilabel">Upgrade</span> operation to install
            the newer product version.
          </p><p>
            You can also use the <span class="guilabel">Catalog</span> link to
            display the current change history of each product without
            downloading the new catalog. Select the <span class="guilabel">Do not
            update at this time</span> check box to view the change
            history only.
          </p></li><li class="listitem"><p>
            The MySQL Installer About icon (<span class="inlinemediaobject"><img src="images/mi-question-mark-button.png" align="middle" width="18" height="18"></span>) shows the current version of MySQL Installer and
            general information about MySQL. The version number is
            located above the <span class="guibutton">Back</span> button.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Tip
</div>
<p>
              Always include this version number when reporting a
              problem with MySQL Installer.
</p>
</div>
<p>
            In addition to the About MySQL information
            (<span class="inlinemediaobject"><img src="images/mi-about-welcome-icon.png" align="middle" width="18" height="18"></span>), you can also select the following
            icons from the side panel:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                License icon (<span class="inlinemediaobject"><img src="images/mi-about-license-icon.png" align="middle" width="18" height="18"></span>) for MySQL Installer.
              </p><p>
                This product may include third-party software, used
                under license. If you are using a Commercial release of
                MySQL Installer, the icon opens the MySQL Installer Commercial License Information User Manual for
                licensing information, including licensing information
                relating to third-party software that may be included in
                this Commercial release. If you are using a Community
                release of MySQL Installer, the icon opens the MySQL Installer Community
                License Information User Manual for licensing information, including licensing
                information relating to third-party software that may be
                included in this Community release.
              </p></li><li class="listitem"><p>
                Resource links icon (<span class="inlinemediaobject"><img src="images/mi-about-links-icon.png" align="middle" width="18" height="18"></span>) to the latest MySQL product
                documentation, blogs, webinars, and more.
</p></li></ul>
</div>
</li><li class="listitem"><p>
            The MySQL Installer Options icon (<span class="inlinemediaobject"><img src="images/mi-tool-button.png" align="middle" width="18" height="18"></span>) includes the following tabs:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                <span class="guilabel">Product Catalog</span>: Manages the daily
                automatic catalog updates. By default, catalog updates
                are scheduled at a fixed hour.


                When new products or product versions are available,
                MySQL Installer adds them to the catalog and then displays an arrow
                icon (<span class="inlinemediaobject"><img src="images/wb-icon-upgrade-arrow.png" align="middle" width="18" height="18"></span>) next to the version number of
                installed products listed in the dashboard.
              </p><p>
                Use this option to enable or disable automatic catalog
                updates and to reset the time of day when the MySQL Installer
                updates the catalog automatically. For specific
                settings, see the task named
                <code class="literal">ManifestUpdate</code> in the Windows Task
                Scheduler.
              </p></li><li class="listitem"><p>
                <span class="guilabel">Connectivity Settings</span>: Several
                operations performed by MySQL Installer require internet access.
                This option enables you to use a default value to
                validate the connection or to use a different URL, one
                selected from a list or added by you manually. With the
                <span class="guilabel">Manual</span> option selected, new URLs
                can be added and all URLs in the list can be moved or
                deleted. When the <span class="guilabel">Automatic</span> option
                is selected, MySQL Installer attempts to connect to each default
                URL in the list (in order) until a connection is made.
                If no connection can be made, it raises an error.
</p></li></ul>
</div>
</li></ol>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title"><a name="locate-products"></a>Locating Products to Install</h5>

</div>

</div>

</div>
<p>
        MySQL products in the catalog are listed by category: MySQL
        Servers, Applications, MySQL Connectors, and Documentation. Only
        the latest GA versions appear in the <span class="guilabel">Available
        Products</span> pane by default. If you are looking for a
        pre-release or older version of a product, it may not be visible
        in the default list.
      </p><p>
        To change the default product list, click
        <span class="guilabel">Add</span> on the dashboard to open the Select
        Products and Features page, and then click
        <span class="guibutton">Edit</span> to open the filter dialog box (see
        the figure that follows). Modify the product values and then
        click <span class="guibutton">Filter</span>.
</p>
<div class="figure">
<a name="mysql-installer-product-filter-fig"></a><p class="title"><b>Figure 2.12 Filter Available Products</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mi-product-filter.png" width="456" height="249" alt="Filter by Text, Category, Age, Already Downloaded, and Architecture.">
</div>

</div>

</div>
<br class="figure-break"><p>
        Reset one or more of the following values to filter the list of
        available products:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Text: Filter by text.
          </p></li><li class="listitem"><p>
            Category: All Software (default), MySQL Servers,
            Applications, MySQL Connectors, or Documentation (for
            samples and documentation).
          </p></li><li class="listitem"><p>
            Maturity: Current Bundle (appears initially with the full
            package only), Pre-Release, Current GA, or Other Releases.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              The Commercial release of MySQL Installer does not display any MySQL
              products when you select the Pre-Release age filter.
              Products in development are available from the Community
              release of MySQL Installer only.
</p>
</div>
</li><li class="listitem"><p>
            Already Downloaded (the check box is deselected by default).
          </p></li><li class="listitem"><p>
            Architecture: Any (default), 32-bit, or 64-bit.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title"><a name="upgrade-mysql-installer"></a>Upgrading MySQL Installer</h5>

</div>

</div>

</div>
<p>
        MySQL Installer remains installed on your computer, and like other
        software, MySQL Installer can be upgraded from the previous version. In
        some cases, other MySQL software may require that you upgrade
        MySQL Installer for compatibility. This section describes how to identify
        the current version of MySQL Installer and how to upgrade MySQL Installer manually.
      </p><p>
        <span class="bold"><strong>To locate the installed version of
        MySQL Installer:</strong></span>
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Start MySQL Installer from the search menu. The MySQL Installer dashboard opens.
          </p></li><li class="listitem"><p>
            Click the MySQL Installer About icon (<span class="inlinemediaobject"><img src="images/mi-question-mark-button.png" align="middle" width="18" height="18"></span>). The version number is located above
            the <span class="guibutton">Back</span> button.
</p></li></ol>
</div>
<p>
        <span class="bold"><strong>To initiate an on-demand upgrade of
        MySQL Installer:</strong></span>
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Connect the computer with MySQL Installer installed to the internet.
          </p></li><li class="listitem"><p>
            Start MySQL Installer from the search menu. The MySQL Installer dashboard opens.
          </p></li><li class="listitem"><p>
            Click <span class="guilabel">Catalog</span> on the bottom of the
            dashboard to open the Update Catalog window.
          </p></li><li class="listitem"><p>
            Click <span class="guibutton">Execute</span> to begin the process.
            If the installed version of MySQL Installer can be upgraded, you will
            be prompted to start the upgrade.
          </p></li><li class="listitem"><p>
            Click <span class="guibutton">Next</span> to review all changes to
            the catalog and then click <span class="guibutton">Finish</span> to
            return to the dashboard.
          </p></li><li class="listitem"><p>
            Verify the (new) installed version of MySQL Installer (see the previous
            procedure).
</p></li></ol>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="MySQLInstallerConsole"></a>2.3.3.5 MySQLInstallerConsole Reference</h4>

</div>

</div>

</div>
<a class="indexterm" name="idm46444442815776"></a><a class="indexterm" name="idm46444442814736"></a><a class="indexterm" name="idm46444442813664"></a><a class="indexterm" name="idm46444442812176"></a><p>
      <a class="link" href="installing.html#MySQLInstallerConsole" title="2.3.3.5 MySQLInstallerConsole Reference"><span class="command"><strong>MySQLInstallerConsole.exe</strong></span></a> provides command-line
      functionality that is similar to MySQL Installer. It is installed when MySQL Installer
      is initially executed and then available within the
      <code class="filename">MySQL Installer</code> directory. Typically, that is
      in <code class="filename">C:\Program Files (x86)\MySQL\MySQL
      Installer\</code>, and the console must be executed with
      administrative privileges.
    </p><p>
      To use, invoke the command prompt with administrative privileges
      by choosing <span class="guimenu">Start</span>,
      <span class="guimenu">Accessories</span>, then right-click on
      <span class="guimenu">Command Prompt</span> and choose <code class="literal">Run as
      administrator</code>. And from the command line, optionally
      change the directory to where
      <a class="link" href="installing.html#MySQLInstallerConsole" title="2.3.3.5 MySQLInstallerConsole Reference"><span class="command"><strong>MySQLInstallerConsole.exe</strong></span></a> is located:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>cd Program Files (x86)\MySQL\MySQL Installer for Windows</code></strong>
C:\Program Files (x86)\MySQL\MySQL Installer for Windows&gt; <strong class="userinput"><code>MySQLInstallerConsole.exe help</code></strong>
=================== Start Initialization ===================
MySQL Installer is running in Community mode

Attempting to update manifest.
Initializing product requirements
Loading product catalog
Checking for product catalog snippets
Checking for product packages in the bundle
Categorizing product catalog
Finding all installed packages.
Your product catalog was last updated at 11/1/2016 4:10:38 PM
=================== End Initialization ===================

The following commands are available:

Configure - Configures one or more of your installed programs.
Help      - Provides list of available commands.
Install   - Install and configure one or more available MySQL programs.
List      - Provides an interactive way to list all products available.
Modify    - Modifies the features of installed products.
Remove    - Removes one or more products from your system.
Status    - Shows the status of all installed products.
Update    - Update the current product catalog.
Upgrade   - Upgrades one or more of your installed programs.
</pre><p>
      <a class="link" href="installing.html#MySQLInstallerConsole" title="2.3.3.5 MySQLInstallerConsole Reference"><span class="command"><strong>MySQLInstallerConsole.exe</strong></span></a> supports the
      following commands:
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Configuration block values that contain a colon (":") must be
        wrapped in double quotes. For example,
        installdir="C:\MySQL\MySQL Server 8.0".
</p>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="MySQLInstallerConsole-configure"></a>
          <a class="indexterm" name="idm46444442795552"></a>

          <a class="indexterm" name="idm46444442794064"></a>

          <code class="literal">configure <em class="replaceable"><code>[product1]:[setting]=[value];
          [product2]:[setting]=[value]; [...]</code></em></code>
        </p><p>
          Configure one or more MySQL products on your system. Multiple
          setting=value pairs can be configured for each product.
        </p><p>
          Switches include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">-showsettings</code> : Displays the available
              options for the selected product, by passing in the
              product name after <code class="literal">-showsettings</code>.
            </p></li><li class="listitem"><p>
              <code class="literal">-silent</code> : Disable confirmation prompts.
</p></li></ul>
</div>
<pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole configure -showsettings server</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole configure server:port=3307</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-help"></a>
          <a class="indexterm" name="idm46444442782736"></a>

          <a class="indexterm" name="idm46444442781248"></a>

          <code class="literal">help <em class="replaceable"><code>[command]</code></em></code>
        </p><p>
          Displays a help message with usage examples, and then exits.
          Pass in an additional command to receive help specific to that
          command.
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole help</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole help install</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-install"></a>
          <a class="indexterm" name="idm46444442774640"></a>

          <a class="indexterm" name="idm46444442773152"></a>

          <code class="literal">install <em class="replaceable"><code>[product]:[features]:[config
          block]:[config block]:[config block];
          [...]</code></em></code>
        </p><p>
          Install one or more MySQL products on your system. If
          pre-release products are available, both GA and pre-release
          products are installed when the value of the
          <code class="literal">-type</code> switch is
          <code class="literal">Developer</code>, <code class="literal">Client</code>, or
          <code class="literal">Full</code>. Use the
          <code class="literal">-only_ga_products</code> switch to restrict the
          product set to GA products only when using these setup types.
        </p><p>
          Switches and syntax options include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">-only_ga_products</code> : Restricts the
              product set to include GA products only.
            </p></li><li class="listitem"><p>
              <code class="literal">-type=[SetupType]</code> : Installs a
              predefined set of software. The "SetupType" can be one of
              the following:
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
                Non-custom setup types can only be chosen if no other
                MySQL products are installed.
</p>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; "><li class="listitem"><p>
                  <span class="bold"><strong>Developer</strong></span>: Installs a
                  complete development environment.
                </p></li><li class="listitem"><p>
                  <span class="bold"><strong>Server</strong></span>: Installs a
                  single MySQL server
                </p></li><li class="listitem"><p>
                  <span class="bold"><strong>Client</strong></span>: Installs
                  client programs and libraries
                </p></li><li class="listitem"><p>
                  <span class="bold"><strong>Full</strong></span>: Installs
                  everything
                </p></li><li class="listitem"><p>
                  <span class="bold"><strong>Custom</strong></span>: Installs user
                  selected products. This is the default option.
</p></li></ul>
</div>
</li><li class="listitem"><p>
              <code class="literal">-showsettings</code> : Displays the available
              options for the selected product, by passing in the
              product name after <code class="literal">-showsettings</code>.
            </p></li><li class="listitem"><p>
              <code class="literal">-silent</code> : Disable confirmation prompts.
            </p></li><li class="listitem"><p>
              <em class="replaceable"><code>[config block]</code></em>: One or more
              configuration blocks can be specified. Each configuration
              block is a semicolon separated list of key value pairs. A
              block can include either a "config" or "user" type key,
              where "config" is the default type if one is not defined.
            </p><p>
              Configuration block values that contain a colon character
              (<code class="literal">:</code>) must be wrapped in double quotes.
              For example, <code class="literal">installdir="C:\MySQL\MySQL Server
              8.0"</code>.
            </p><p>
              Only one "config" type block can be defined per product. A
              "user" block should be defined for each user that should
              be created during the product's installation.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
                Adding users is not supported when a product is being
                reconfigured.
</p>
</div>
</li><li class="listitem"><p>
              <em class="replaceable"><code>[feature]</code></em>: The feature block is
              a semicolon separated list of features, or an asterisk
              character (<code class="literal">*</code>) to select all features.
</p></li></ul>
</div>
<pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole install server;5.6.25:*:port=3307;serverid=2:type=user;username=foo;password=bar;role=DBManager</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole install server;5.6.25;x64 -silent</code></strong>
</pre><p>
          An example that passes in additional configuration blocks,
          separated by <code class="literal">^</code> to fit:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole install server;5.6.25;x64:*:type=config;openfirewall=true; ^
          generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;rootpasswd=pass; ^
          installdir="C:\MySQL\MySQL Server 5.6":type=user;datadir="C:\MySQL\data";username=foo;password=bar;role=DBManager</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-list"></a>
          <a class="indexterm" name="idm46444442735536"></a>

          <a class="indexterm" name="idm46444442734048"></a>

          <code class="literal">list</code>
        </p><p>
          Lists an interactive console where all of the available MySQL
          products can be searched. Execute
          <code class="literal">MySQLInstallerConsole list</code> to launch the
          console, and enter in a substring to search.
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole list</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-modify"></a>
          <a class="indexterm" name="idm46444442727712"></a>

          <a class="indexterm" name="idm46444442726224"></a>

          <code class="literal">modify <em class="replaceable"><code>[product1:-removelist|+addlist]
          [product2:-removelist|+addlist] [...]</code></em></code>
        </p><p>
          Modifies or displays features of a previously installed MySQL
          product.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">-silent</code> : Disable confirmation prompts.
</p></li></ul>
</div>
<pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole modify server</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole modify server:+documentation</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole modify server:-debug</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-remove"></a>
          <a class="indexterm" name="idm46444442716896"></a>

          <a class="indexterm" name="idm46444442715408"></a>

          <code class="literal">remove <em class="replaceable"><code>[product1] [product2]
          [...]</code></em></code>
        </p><p>
          Removes one ore more products from your system.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">*</code> : Pass in <code class="literal">*</code> to
              remove all of the MySQL products.
            </p></li><li class="listitem"><p>
              <code class="literal">-continue</code> : Continue the operation even
              if an error occurs.
            </p></li><li class="listitem"><p>
              <code class="literal">-silent</code> : Disable confirmation prompts.
</p></li></ul>
</div>
<pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole remove *</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole remove server</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-status"></a>
          <a class="indexterm" name="idm46444442703136"></a>

          <a class="indexterm" name="idm46444442701648"></a>

          <code class="literal">status</code>
        </p><p>
          Provides a quick overview of the MySQL products that are
          installed on the system. Information includes product name and
          version, architecture, date installed, and install location.
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole status</code></strong>
</pre></li><li class="listitem"><p><a name="MySQLInstallerConsole-update"></a>
          <a class="indexterm" name="idm46444442695904"></a>

          <a class="indexterm" name="idm46444442694416"></a>

          <code class="literal">update</code>
        </p><p>
          Downloads the latest MySQL product catalog to your system. On
          success, the download catalog will be applied the next time
          either MySQLInstaller or MySQLInstallerConsole is executed.
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole <em class="replaceable"><code>update</code></em></code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            The <span class="guilabel">Automatic Catalog Update</span> GUI option
            executes this command from the Windows Task Scheduler.
</p>
</div>
</li><li class="listitem"><p><a name="MySQLInstallerConsole-upgrade"></a>
          <a class="indexterm" name="idm46444442686848"></a>

          <a class="indexterm" name="idm46444442685360"></a>

          <code class="literal">upgrade <em class="replaceable"><code>[product1:version]
          [product2:version] [...]</code></em></code>
        </p><p>
          Upgrades one or more products on your system. Syntax options
          include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">*</code> : Pass in <code class="literal">*</code> to
              upgrade all products to the latest version, or pass in
              specific products.
            </p></li><li class="listitem"><p>
              <code class="literal">!</code> : Pass in <code class="literal">!</code> as a
              version number to upgrade the MySQL product to its latest
              version.
            </p></li><li class="listitem"><p>
              <code class="literal">-silent</code> : Disable confirmation prompts.
</p></li></ul>
</div>
<pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole upgrade *</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole upgrade workbench:6.3.5</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole upgrade workbench:!</code></strong>
C:\&gt; <strong class="userinput"><code>MySQLInstallerConsole upgrade workbench:6.3.5 excel:1.3.2</code></strong>
</pre></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-install-archive"></a>2.3.4 Installing MySQL on Microsoft Windows Using a
<code class="literal">noinstall</code> ZIP Archive</h3>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#windows-extract-archive">2.3.4.1 Extracting the Install Archive</a></span></dt><dt><span class="section"><a href="installing.html#windows-create-option-file">2.3.4.2 Creating an Option File</a></span></dt><dt><span class="section"><a href="installing.html#windows-select-server">2.3.4.3 Selecting a MySQL Server Type</a></span></dt><dt><span class="section"><a href="installing.html#windows-initialize-data-directory">2.3.4.4 Initializing the Data Directory</a></span></dt><dt><span class="section"><a href="installing.html#windows-server-first-start">2.3.4.5 Starting the Server for the First Time</a></span></dt><dt><span class="section"><a href="installing.html#windows-start-command-line">2.3.4.6 Starting MySQL from the Windows Command Line</a></span></dt><dt><span class="section"><a href="installing.html#mysql-installation-windows-path">2.3.4.7 Customizing the PATH for MySQL Tools</a></span></dt><dt><span class="section"><a href="installing.html#windows-start-service">2.3.4.8 Starting MySQL as a Windows Service</a></span></dt><dt><span class="section"><a href="installing.html#windows-testing">2.3.4.9 Testing The MySQL Installation</a></span></dt></dl>
</div>
<p>
      Users who are installing from the <code class="literal">noinstall</code>
      package can use the instructions in this section to manually
      install MySQL. The process for installing MySQL from a ZIP Archive
      package is as follows:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Extract the main archive to the desired install directory
        </p><p>
          <span class="emphasis"><em>Optional</em></span>: also extract the debug-test
          archive if you plan to execute the MySQL benchmark and test
          suite
        </p></li><li class="listitem"><p>
          Create an option file
        </p></li><li class="listitem"><p>
          Choose a MySQL server type
        </p></li><li class="listitem"><p>
          Initialize MySQL
        </p></li><li class="listitem"><p>
          Start the MySQL server
        </p></li><li class="listitem"><p>
          Secure the default user accounts
</p></li></ol>
</div>
<p>
      This process is described in the sections that follow.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-extract-archive"></a>2.3.4.1 Extracting the Install Archive</h4>
</div>
</div>
</div>
<p>
        To install MySQL manually, do the following:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            If you are upgrading from a previous version please refer to
            <a class="xref" href="installing.html#windows-upgrading" title="2.11.10 Upgrading MySQL on Windows">Section 2.11.10, “Upgrading MySQL on Windows”</a>, before beginning the
            upgrade process.
          </p></li><li class="listitem"><p>
            Make sure that you are logged in as a user with
            administrator privileges.
          </p></li><li class="listitem"><p>
            Choose an installation location. Traditionally, the MySQL
            server is installed in <code class="filename">C:\mysql</code>. If you
            do not install MySQL at <code class="filename">C:\mysql</code>, you
            must specify the path to the install directory during
            startup or in an option file. See
            <a class="xref" href="installing.html#windows-create-option-file" title="2.3.4.2 Creating an Option File">Section 2.3.4.2, “Creating an Option File”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              The MySQL Installer installs MySQL under <code class="filename">C:\Program
              Files\MySQL</code>.
</p>
</div>
</li><li class="listitem"><p>
            Extract the install archive to the chosen installation
            location using your preferred file-compression tool. Some
            tools may extract the archive to a folder within your chosen
            installation location. If this occurs, you can move the
            contents of the subfolder into the chosen installation
            location.
</p></li></ol>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-create-option-file"></a>2.3.4.2 Creating an Option File</h4>

</div>

</div>

</div>
<p>
        If you need to specify startup options when you run the server,
        you can indicate them on the command line or place them in an
        option file. For options that are used every time the server
        starts, you may find it most convenient to use an option file to
        specify your MySQL configuration. This is particularly true
        under the following circumstances:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            The installation or data directory locations are different
            from the default locations (<code class="filename">C:\Program
            Files\MySQL\MySQL Server 8.0</code> and
            <code class="filename">C:\Program Files\MySQL\MySQL Server
            8.0\data</code>).
          </p></li><li class="listitem"><p>
            You need to tune the server settings, such as memory, cache,
            or InnoDB configuration information.
</p></li></ul>
</div>
<p>
        When the MySQL server starts on Windows, it looks for option
        files in several locations, such as the Windows directory,
        <code class="filename">C:\</code>, and the MySQL installation directory
        (for the full list of locations, see
        <a class="xref" href="programs.html#option-files" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>). The Windows directory typically
        is named something like <code class="filename">C:\WINDOWS</code>. You can
        determine its exact location from the value of the
        <code class="literal">WINDIR</code> environment variable using the
        following command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>echo %WINDIR%</code></strong>
</pre><p>
        MySQL looks for options in each location first in the
        <code class="filename">my.ini</code> file, and then in the
        <code class="filename">my.cnf</code> file. However, to avoid confusion,
        it is best if you use only one file. If your PC uses a boot
        loader where <code class="filename">C:</code> is not the boot drive, your
        only option is to use the <code class="filename">my.ini</code> file.
        Whichever option file you use, it must be a plain text file.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          When using the MySQL Installer to install MySQL Server, it will create
          the <code class="filename">my.ini</code> at the default location, and
          the user executing MySQL Installer is granted full permissions to this
          new <code class="filename">my.ini</code> file.
        </p><p>
          In other words, be sure that the MySQL Server user has
          permission to read the <code class="filename">my.ini</code> file.
</p>
</div>
<p>
        You can also make use of the example option files included with
        your MySQL distribution; see
        <a class="xref" href="server-administration.html#server-configuration-defaults" title="5.1.2 Server Configuration Defaults">Section 5.1.2, “Server Configuration Defaults”</a>.
      </p><p>
        An option file can be created and modified with any text editor,
        such as Notepad. For example, if MySQL is installed in
        <code class="filename">E:\mysql</code> and the data directory is in
        <code class="filename">E:\mydata\data</code>, you can create an option
        file containing a <code class="literal">[mysqld]</code> section to specify
        values for the <code class="option">basedir</code> and
        <code class="option">datadir</code> options:
      </p><pre data-lang="ini" class="programlisting">[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=E:/mydata/data</pre><p>
        Microsoft Windows path names are specified in option files using
        (forward) slashes rather than backslashes. If you do use
        backslashes, double them:
      </p><pre data-lang="ini" class="programlisting">[mysqld]
# set basedir to your installation path
basedir=E:\\mysql
# set datadir to the location of your data directory
datadir=E:\\mydata\\data</pre><p>
        The rules for use of backslash in option file values are given
        in <a class="xref" href="programs.html#option-files" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>.
      </p><p>
        The ZIP archive does not include a <code class="filename">data</code>
        directory. To initialize a MySQL installation by creating the
        data directory and populating the tables in the mysql system
        database, initialize MySQL using either
        <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> or
        <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>. For
        additional information, see
        <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
      </p><p>
        If you would like to use a data directory in a different
        location, you should copy the entire contents of the
        <code class="filename">data</code> directory to the new location. For
        example, if you want to use <code class="filename">E:\mydata</code> as
        the data directory instead, you must do two things:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Move the entire <code class="filename">data</code> directory and all
            of its contents from the default location (for example
            <code class="filename">C:\Program Files\MySQL\MySQL Server
            8.0\data</code>) to
            <code class="filename">E:\mydata</code>.
          </p></li><li class="listitem"><p>
            Use a <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">--datadir</code></a> option to
            specify the new data directory location each time you start
            the server.
</p></li></ol>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-select-server"></a>2.3.4.3 Selecting a MySQL Server Type</h4>

</div>

</div>

</div>
<p>
        The following table shows the available servers for Windows in
        MySQL 8.0.
</p>
<div class="informaltable">
<table summary="Servers available for Windows in MySQL 8.0."><col width="20%"><col width="80%"><thead><tr>
            <th scope="col">Binary</th>
            <th scope="col">Description</th>
          </tr></thead><tbody><tr>
            <td scope="row"><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a></td>
            <td>Optimized binary with named-pipe support</td>
          </tr><tr>
            <td scope="row"><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld-debug</strong></span></a></td>
            <td>Like <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>, but compiled with full debugging and
              automatic memory allocation checking</td>
</tr></tbody></table>
</div>
<p>
        All of the preceding binaries are optimized for modern Intel
        processors, but should work on any Intel i386-class or higher
        processor.
      </p><p>
        Each of the servers in a distribution support the same set of
        storage engines. The <a class="link" href="sql-statements.html#show-engines" title="13.7.7.16 SHOW ENGINES Statement"><code class="literal">SHOW ENGINES</code></a>
        statement displays which engines a given server supports.
      </p><p>
        All Windows MySQL 8.0 servers have support for
        symbolic linking of database directories.
      </p><a class="indexterm" name="idm46444442591616"></a><a class="indexterm" name="idm46444442590544"></a><p>
        MySQL supports TCP/IP on all Windows platforms. MySQL servers on
        Windows also support named pipes, if you start the server with
        the <a class="link" href="server-administration.html#sysvar_named_pipe"><code class="literal">named_pipe</code></a> system variable
        enabled. It is necessary to enable this variable explicitly
        because some users have experienced problems with shutting down
        the MySQL server when named pipes were used. The default is to
        use TCP/IP regardless of platform because named pipes are slower
        than TCP/IP in many Windows configurations.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-initialize-data-directory"></a>2.3.4.4 Initializing the Data Directory</h4>

</div>

</div>

</div>
<p>
        If you installed MySQL using the <code class="literal">noinstall</code>
        package, no data directory is included. To initialize the data
        directory, use the instructions at
        <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-server-first-start"></a>2.3.4.5 Starting the Server for the First Time</h4>

</div>

</div>

</div>
<p>
        This section gives a general overview of starting the MySQL
        server. The following sections provide more specific information
        for starting the MySQL server from the command line or as a
        Windows service.
      </p><p>
        The information here applies primarily if you installed MySQL
        using the <code class="literal">noinstall</code> version, or if you wish
        to configure and test MySQL manually rather than with the MySQL Installer.
      </p><p>
        The examples in these sections assume that MySQL is installed
        under the default location of <code class="filename">C:\Program
        Files\MySQL\MySQL Server 8.0</code>. Adjust the
        path names shown in the examples if you have MySQL installed in
        a different location.
      </p><p>
        Clients have two options. They can use TCP/IP, or they can use a
        named pipe if the server supports named-pipe connections.
      </p><p>
        MySQL for Windows also supports shared-memory connections if the
        server is started with the
        <a class="link" href="server-administration.html#sysvar_shared_memory"><code class="literal">shared_memory</code></a> system variable
        enabled. Clients can connect through shared memory by using the
        <a class="link" href="programs.html#option_general_protocol"><code class="option">--protocol=MEMORY</code></a> option.
      </p><p>
        For information about which server binary to run, see
        <a class="xref" href="installing.html#windows-select-server" title="2.3.4.3 Selecting a MySQL Server Type">Section 2.3.4.3, “Selecting a MySQL Server Type”</a>.
      </p><p>
        Testing is best done from a command prompt in a console window
        (or <span class="quote">“<span class="quote">DOS window</span>”</span>). In this way you can have the
        server display status messages in the window where they are easy
        to see. If something is wrong with your configuration, these
        messages make it easier for you to identify and fix any
        problems.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          The database must be initialized before MySQL can be started.
          For additional information about the initialization process,
          see <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
</p>
</div>
<p>
        To start the server, enter this command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --console</code></strong>
</pre><p>
        For a server that includes <code class="literal">InnoDB</code> support,
        you should see the messages similar to those following as it
        starts (the path names and sizes may differ):
      </p><pre data-lang="none" class="programlisting">InnoDB: The first specified datafile c:\ibdata\ibdata1 did not exist:
InnoDB: a new database to be created!
InnoDB: Setting file c:\ibdata\ibdata1 size to 209715200
InnoDB: Database physically writes the file full: wait...
InnoDB: Log file c:\iblogs\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile0 size to 31457280
InnoDB: Log file c:\iblogs\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile1 size to 31457280
InnoDB: Log file c:\iblogs\ib_logfile2 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile2 size to 31457280
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: creating foreign key constraint system tables
InnoDB: foreign key constraint system tables created
011024 10:58:25  InnoDB: Started</pre><p>
        When the server finishes its startup sequence, you should see
        something like this, which indicates that the server is ready to
        service client connections:
      </p><pre data-lang="none" class="programlisting">mysqld: ready for connections
Version: '8.0.22'  socket: ''  port: 3306</pre><p>
        The server continues to write to the console any further
        diagnostic output it produces. You can open a new console window
        in which to run client programs.
      </p><p>
        If you omit the <a class="link" href="server-administration.html#option_mysqld_console"><code class="option">--console</code></a> option,
        the server writes diagnostic output to the error log in the data
        directory (<code class="filename">C:\Program Files\MySQL\MySQL Server
        8.0\data</code> by default). The error log is
        the file with the <code class="filename">.err</code> extension, and may
        be set using the <a class="link" href="server-administration.html#option_mysqld_log-error"><code class="option">--log-error</code></a>
        option.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          The initial <code class="literal">root</code> account in the MySQL grant
          tables has no password. After starting the server, you should
          set up a password for it using the instructions in
          <a class="xref" href="installing.html#default-privileges" title="2.10.4 Securing the Initial MySQL Account">Section 2.10.4, “Securing the Initial MySQL Account”</a>.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-start-command-line"></a>2.3.4.6 Starting MySQL from the Windows Command Line</h4>

</div>

</div>

</div>
<p>
        The MySQL server can be started manually from the command line.
        This can be done on any version of Windows.
      </p><p>
        To start the <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server from the command
        line, you should start a console window (or <span class="quote">“<span class="quote">DOS
        window</span>”</span>) and enter this command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld"</code></strong>
</pre><p>
        The path to <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> may vary depending on the
        install location of MySQL on your system.
      </p><p>
        You can stop the MySQL server by executing this command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin" -u root shutdown</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          If the MySQL <code class="literal">root</code> user account has a
          password, you need to invoke <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>
          with the <code class="option">-p</code> option and supply the password
          when prompted.
</p>
</div>
<p>
        This command invokes the MySQL administrative utility
        <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> to connect to the server and tell
        it to shut down. The command connects as the MySQL
        <code class="literal">root</code> user, which is the default
        administrative account in the MySQL grant system.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Users in the MySQL grant system are wholly independent from
          any operating system users under Microsoft Windows.
</p>
</div>
<p>
        If <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> doesn't start, check the error log
        to see whether the server wrote any messages there to indicate
        the cause of the problem. By default, the error log is located
        in the <code class="filename">C:\Program Files\MySQL\MySQL Server
        8.0\data</code> directory. It is the file with
        a suffix of <code class="filename">.err</code>, or may be specified by
        passing in the <a class="link" href="server-administration.html#option_mysqld_log-error"><code class="option">--log-error</code></a>
        option. Alternatively, you can try to start the server with the
        <a class="link" href="server-administration.html#option_mysqld_console"><code class="option">--console</code></a> option; in this case,
        the server may display some useful information on the screen
        that will help solve the problem.
      </p><p>
        The last option is to start <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with the
        <a class="link" href="server-administration.html#option_mysqld_standalone"><code class="option">--standalone</code></a> and
        <a class="link" href="server-administration.html#option_mysqld_debug"><code class="option">--debug</code></a> options. In this case,
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> writes a log file
        <code class="filename">C:\mysqld.trace</code> that should contain the
        reason why <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> doesn't start. See
        <a class="xref" href="extending-mysql.html#dbug-package" title="29.5.4 The DBUG Package">Section 29.5.4, “The DBUG Package”</a>.
      </p><p>
        Use <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld --verbose --help</strong></span></a> to display all
        the options that <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> supports.
</p>
</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="mysql-installation-windows-path"></a>2.3.4.7 Customizing the PATH for MySQL Tools</h4>

</div>

</div>

</div>
<a class="indexterm" name="idm46444442524800"></a><a class="indexterm" name="idm46444442523712"></a>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
          You must exercise great care when editing your system
          <code class="literal">PATH</code> by hand; accidental deletion or
          modification of any portion of the existing
          <code class="literal">PATH</code> value can leave you with a
          malfunctioning or even unusable system.
</p>
</div>
<p>
        To make it easier to invoke MySQL programs, you can add the path
        name of the MySQL <code class="filename">bin</code> directory to your
        Windows system <code class="literal">PATH</code> environment variable:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            On the Windows desktop, right-click the <span class="guiicon">My
            Computer</span> icon, and select
            <span class="guimenuitem">Properties</span>.
          </p></li><li class="listitem"><p>
            Next select the <span class="guimenuitem">Advanced</span> tab from
            the <span class="guimenu">System Properties</span> menu that appears,
            and click the <span class="guibutton">Environment Variables</span>
            button.
          </p></li><li class="listitem"><p>
            Under <span class="guilabel">System Variables</span>, select
            <span class="guimenuitem">Path</span>, and then click the
            <span class="guibutton">Edit</span> button. The <span class="guimenu">Edit System
            Variable</span> dialogue should appear.
          </p></li><li class="listitem"><p>
            Place your cursor at the end of the text appearing in the
            space marked <span class="guilabel">Variable Value</span>. (Use the
            <span class="keycap"><strong>End</strong></span> key to ensure that your cursor is
            positioned at the very end of the text in this space.) Then
            enter the complete path name of your MySQL
            <code class="filename">bin</code> directory (for example,
            <code class="literal">C:\Program Files\MySQL\MySQL Server
            8.0\bin</code>)
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              There must be a semicolon separating this path from any
              values present in this field.
</p>
</div>
<p>
            Dismiss this dialogue, and each dialogue in turn, by
            clicking <span class="guibutton">OK</span> until all of the
            dialogues that were opened have been dismissed. The new
            <code class="literal">PATH</code> value should now be available to any
            new command shell you open, allowing you to invoke any MySQL
            executable program by typing its name at the DOS prompt from
            any directory on the system, without having to supply the
            path. This includes the servers, the
            <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client, and all MySQL command-line
            utilities such as <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> and
            <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>.
</p></li></ul>
</div>
<p>
        You should not add the MySQL <code class="filename">bin</code> directory
        to your Windows <code class="literal">PATH</code> if you are running
        multiple MySQL servers on the same machine.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-start-service"></a>2.3.4.8 Starting MySQL as a Windows Service</h4>

</div>

</div>

</div>
<p>
        On Windows, the recommended way to run MySQL is to install it as
        a Windows service, so that MySQL starts and stops automatically
        when Windows starts and stops. A MySQL server installed as a
        service can also be controlled from the command line using
        <span class="command"><strong>NET</strong></span> commands, or with the graphical
        <span class="command"><strong>Services</strong></span> utility. Generally, to install MySQL
        as a Windows service you should be logged in using an account
        that has administrator rights.
      </p><p>
        The <span class="command"><strong>Services</strong></span> utility (the Windows
        <span class="command"><strong>Service Control Manager</strong></span>) can be found in the
        Windows Control Panel. To avoid conflicts, it is advisable to
        close the <span class="command"><strong>Services</strong></span> utility while performing
        server installation or removal operations from the command line.
</p>
<h5><a name="idm46444442489296"></a>Installing the service</h5>
<p>
        Before installing MySQL as a Windows service, you should first
        stop the current server if it is running by using the following
        command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin"</code></strong>
          <strong class="userinput"><code>-u root shutdown</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          If the MySQL <code class="literal">root</code> user account has a
          password, you need to invoke <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>
          with the <code class="option">-p</code> option and supply the password
          when prompted.
</p>
</div>
<p>
        This command invokes the MySQL administrative utility
        <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> to connect to the server and tell
        it to shut down. The command connects as the MySQL
        <code class="literal">root</code> user, which is the default
        administrative account in the MySQL grant system.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Users in the MySQL grant system are wholly independent from
          any operating system users under Windows.
</p>
</div>
<p>
        Install the server as a service using this command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --install</code></strong>
</pre><p>
        The service-installation command does not start the server.
        Instructions for that are given later in this section.
      </p><p>
        To make it easier to invoke MySQL programs, you can add the path
        name of the MySQL <code class="filename">bin</code> directory to your
        Windows system <code class="literal">PATH</code> environment variable:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            On the Windows desktop, right-click the <span class="guiicon">My
            Computer</span> icon, and select
            <span class="guimenuitem">Properties</span>.
          </p></li><li class="listitem"><p>
            Next select the <span class="guimenuitem">Advanced</span> tab from
            the <span class="guimenu">System Properties</span> menu that appears,
            and click the <span class="guibutton">Environment Variables</span>
            button.
          </p></li><li class="listitem"><p>
            Under <span class="guilabel">System Variables</span>, select
            <span class="guimenuitem">Path</span>, and then click the
            <span class="guibutton">Edit</span> button. The <span class="guimenu">Edit System
            Variable</span> dialogue should appear.
          </p></li><li class="listitem"><p>
            Place your cursor at the end of the text appearing in the
            space marked <span class="guilabel">Variable Value</span>. (Use the
            <span class="keycap"><strong>End</strong></span> key to ensure that your cursor is
            positioned at the very end of the text in this space.) Then
            enter the complete path name of your MySQL
            <code class="filename">bin</code> directory (for example,
            <code class="literal">C:\Program Files\MySQL\MySQL Server
            8.0\bin</code>), and there should be a
            semicolon separating this path from any values present in
            this field. Dismiss this dialogue, and each dialogue in
            turn, by clicking <span class="guibutton">OK</span> until all of the
            dialogues that were opened have been dismissed. You should
            now be able to invoke any MySQL executable program by typing
            its name at the DOS prompt from any directory on the system,
            without having to supply the path. This includes the
            servers, the <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client, and all MySQL
            command-line utilities such as <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>
            and <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>.
          </p><p>
            You should not add the MySQL <code class="filename">bin</code>
            directory to your Windows <code class="literal">PATH</code> if you are
            running multiple MySQL servers on the same machine.
</p></li></ul>
</div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
          You must exercise great care when editing your system
          <code class="literal">PATH</code> by hand; accidental deletion or
          modification of any portion of the existing
          <code class="literal">PATH</code> value can leave you with a
          malfunctioning or even unusable system.
</p>
</div>
<p>
        The following additional arguments can be used when installing
        the service:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            You can specify a service name immediately following the
            <code class="option">--install</code> option. The default service name
            is <code class="literal">MySQL</code>.
          </p></li><li class="listitem"><p>
            If a service name is given, it can be followed by a single
            option. By convention, this should be
            <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file=<em class="replaceable"><code>file_name</code></em></code></a>
            to specify the name of an option file from which the server
            should read options when it starts.
          </p><p>
            The use of a single option other than
            <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> is possible
            but discouraged.
            <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> is more
            flexible because it enables you to specify multiple startup
            options for the server by placing them in the named option
            file.
          </p></li><li class="listitem"><p>
            You can also specify a <code class="option">--local-service</code>
            option following the service name. This causes the server to
            run using the <code class="literal">LocalService</code> Windows
            account that has limited system privileges. If both
            <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> and
            <code class="option">--local-service</code> are given following the
            service name, they can be in any order.
</p></li></ul>
</div>
<p>
        For a MySQL server that is installed as a Windows service, the
        following rules determine the service name and option files that
        the server uses:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If the service-installation command specifies no service
            name or the default service name (<code class="literal">MySQL</code>)
            following the <code class="option">--install</code> option, the server
            uses the service name of <code class="literal">MySQL</code> and reads
            options from the <code class="literal">[mysqld]</code> group in the
            standard option files.
          </p></li><li class="listitem"><p>
            If the service-installation command specifies a service name
            other than <code class="literal">MySQL</code> following the
            <code class="option">--install</code> option, the server uses that
            service name. It reads options from the
            <code class="literal">[mysqld]</code> group and the group that has the
            same name as the service in the standard option files. This
            enables you to use the <code class="literal">[mysqld]</code> group for
            options that should be used by all MySQL services, and an
            option group with the service name for use by the server
            installed with that service name.
          </p></li><li class="listitem"><p>
            If the service-installation command specifies a
            <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> option after
            the service name, the server reads options the same way as
            described in the previous item, except that it reads options
            only from the named file and ignores the standard option
            files.
</p></li></ul>
</div>
<p>
        As a more complex example, consider the following command:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld"</code></strong>
          <strong class="userinput"><code>--install MySQL --defaults-file=C:\my-opts.cnf</code></strong>
</pre><p>
        Here, the default service name (<code class="literal">MySQL</code>) is
        given after the <code class="option">--install</code> option. If no
        <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> option had been
        given, this command would have the effect of causing the server
        to read the <code class="literal">[mysqld]</code> group from the standard
        option files. However, because the
        <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> option is
        present, the server reads options from the
        <code class="literal">[mysqld]</code> option group, and only from the
        named file.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          On Windows, if the server is started with the
          <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> and
          <a class="link" href="server-administration.html#option_mysqld_install"><code class="option">--install</code></a> options,
          <a class="link" href="server-administration.html#option_mysqld_install"><code class="option">--install</code></a> must be first.
          Otherwise, <code class="literal">mysqld.exe</code> will attempt to start
          the MySQL server.
</p>
</div>
<p>
        You can also specify options as Start parameters in the Windows
        <span class="command"><strong>Services</strong></span> utility before you start the MySQL
        service.
      </p><p>
        Finally, before trying to start the MySQL service, make sure the
        user variables <code class="literal">%TEMP%</code> and
        <code class="literal">%TMP%</code> (and also <code class="literal">%TMPDIR%</code>,
        if it has ever been set) for the operating system user who is to
        run the service are pointing to a folder to which the user has
        write access. The default user for running the MySQL service is
        <code class="literal">LocalSystem</code>, and the default value for its
        <code class="literal">%TEMP%</code> and <code class="literal">%TMP%</code> is
        <code class="filename">C:\Windows\Temp</code>, a directory
        <code class="literal">LocalSystem</code> has write access to by default.
        However, if there are any changes to that default setup (for
        example, changes to the user who runs the service or to the
        mentioned user variables, or the
        <a class="link" href="server-administration.html#option_mysqld_tmpdir"><code class="option">--tmpdir</code></a> option has been used to
        put the temporary directory somewhere else), the MySQL service
        might fail to run because write access to the temporary
        directory has not been granted to the proper user.
</p>
<h5><a name="idm46444442407264"></a>Starting the service</h5>
<p>
        After a MySQL server instance has been installed as a service,
        Windows starts the service automatically whenever Windows
        starts. The service also can be started immediately from the
        <span class="command"><strong>Services</strong></span> utility, or by using an <span class="command"><strong>sc
        start <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>
        or <span class="command"><strong>NET START
        <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>
        command. <span class="command"><strong>SC</strong></span> and <span class="command"><strong>NET</strong></span>
        commands are not case-sensitive.
      </p><p>
        When run as a service, <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> has no access
        to a console window, so no messages can be seen there. If
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> does not start, check the error log to
        see whether the server wrote any messages there to indicate the
        cause of the problem. The error log is located in the MySQL data
        directory (for example, <code class="filename">C:\Program Files\MySQL\MySQL
        Server 8.0\data</code>). It is the file with a
        suffix of <code class="filename">.err</code>.
      </p><p>
        When a MySQL server has been installed as a service, and the
        service is running, Windows stops the service automatically when
        Windows shuts down. The server also can be stopped manually
        using the <code class="literal">Services</code> utility, the <span class="command"><strong>sc
        stop <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>
        command, the <span class="command"><strong>NET START
        <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>
        command, or the <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin shutdown</strong></span></a> command.
      </p><p>
        You also have the choice of installing the server as a manual
        service if you do not wish for the service to be started
        automatically during the boot process. To do this, use the
        <code class="option">--install-manual</code> option rather than the
        <code class="option">--install</code> option:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --install-manual</code></strong>
</pre>
<h5><a name="idm46444442389248"></a>Removing the service</h5>
<p>
        To remove a server that is installed as a service, first stop it
        if it is running by executing <span class="command"><strong>SC STOP
        <em class="replaceable"><code>mysqld_service_name</code></em></strong></span> or
        <span class="command"><strong>NET STOP
        <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>. Then
        use <span class="command"><strong>SC DELETE
        <em class="replaceable"><code>mysqld_service_name</code></em></strong></span> to
        remove it:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>SC DELETE mysql</code></strong>
</pre><p>
        Alternatively, use the <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
        <a class="link" href="server-administration.html#option_mysqld_remove"><code class="option">--remove</code></a> option to remove the
        service.
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --remove</code></strong>
</pre><p>
        If <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> is not running as a service, you
        can start it from the command line. For instructions, see
        <a class="xref" href="installing.html#windows-start-command-line" title="2.3.4.6 Starting MySQL from the Windows Command Line">Section 2.3.4.6, “Starting MySQL from the Windows Command Line”</a>.
      </p><p>
        If you encounter difficulties during installation, see
        <a class="xref" href="installing.html#windows-troubleshooting" title="2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation">Section 2.3.5, “Troubleshooting a Microsoft Windows MySQL Server Installation”</a>.
      </p><p>
        For more information about stopping or removing a Windows
        service, see <a class="xref" href="server-administration.html#multiple-windows-services" title="5.8.2.2 Starting Multiple MySQL Instances as Windows Services">Section 5.8.2.2, “Starting Multiple MySQL Instances as Windows Services”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="windows-testing"></a>2.3.4.9 Testing The MySQL Installation</h4>

</div>

</div>

</div>
<a class="indexterm" name="idm46444442372368"></a><a class="indexterm" name="idm46444442371328"></a><p>
        You can test whether the MySQL server is working by executing
        any of the following commands:
      </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqlshow"</code></strong>
C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqlshow" -u root mysql</code></strong>
C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin" version status proc</code></strong>
C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" test</code></strong>
</pre><p>
        If <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> is slow to respond to TCP/IP
        connections from client programs, there is probably a problem
        with your DNS. In this case, start <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
        with the <a class="link" href="server-administration.html#sysvar_skip_name_resolve"><code class="literal">skip_name_resolve</code></a>
        system variable enabled and use only
        <code class="literal">localhost</code> and IP addresses in the
        <code class="literal">Host</code> column of the MySQL grant tables. (Be
        sure that an account exists that specifies an IP address or you
        may not be able to connect.)
      </p><p>
        You can force a MySQL client to use a named-pipe connection
        rather than TCP/IP by specifying the
        <a class="link" href="programs.html#option_general_pipe"><code class="option">--pipe</code></a> or
        <a class="link" href="programs.html#option_general_protocol"><code class="option">--protocol=PIPE</code></a> option, or by
        specifying <code class="literal">.</code> (period) as the host name. Use
        the <a class="link" href="programs.html#option_general_socket"><code class="option">--socket</code></a> option to specify
        the name of the pipe if you do not want to use the default pipe
        name.
      </p><p>
        If you have set a password for the <code class="literal">root</code>
        account, deleted the anonymous account, or created a new user
        account, then to connect to the MySQL server you must use the
        appropriate <code class="option">-u</code> and <code class="option">-p</code> options
        with the commands shown previously. See
        <a class="xref" href="programs.html#connecting" title="4.2.4 Connecting to the MySQL Server Using Command Options">Section 4.2.4, “Connecting to the MySQL Server Using Command Options”</a>.
      </p><p>
        For more information about <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a>, see
        <a class="xref" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information">Section 4.5.7, “<span class="command"><strong>mysqlshow</strong></span> — Display Database, Table, and Column Information”</a>.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-troubleshooting"></a>2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation</h3>

</div>

</div>

</div>
<p>
      When installing and running MySQL for the first time, you may
      encounter certain errors that prevent the MySQL server from
      starting. This section helps you diagnose and correct some of
      these errors.
    </p><p>
      Your first resource when troubleshooting server issues is the
      <a class="link" href="glossary.html#glos_error_log" title="error log">error log</a>. The MySQL server
      uses the error log to record information relevant to the error
      that prevents the server from starting. The error log is located
      in the <a class="link" href="glossary.html#glos_data_directory" title="data directory">data directory</a>
      specified in your <code class="filename">my.ini</code> file. The default
      data directory location is <code class="filename">C:\Program Files\MySQL\MySQL
      Server 8.0\data</code>, or
      <code class="filename">C:\ProgramData\Mysql</code> on Windows 7 and Windows
      Server 2008. The <code class="filename">C:\ProgramData</code> directory is
      hidden by default. You need to change your folder options to see
      the directory and contents. For more information on the error log
      and understanding the content, see <a class="xref" href="server-administration.html#error-log" title="5.4.2 The Error Log">Section 5.4.2, “The Error Log”</a>.
    </p><p>
      For information regarding possible errors, also consult the
      console messages displayed when the MySQL service is starting. Use
      the <span class="command"><strong>SC START
      <em class="replaceable"><code>mysqld_service_name</code></em></strong></span> or
      <span class="command"><strong>NET START
      <em class="replaceable"><code>mysqld_service_name</code></em></strong></span> command
      from the command line after installing <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
      as a service to see any error messages regarding the starting of
      the MySQL server as a service. See
      <a class="xref" href="installing.html#windows-start-service" title="2.3.4.8 Starting MySQL as a Windows Service">Section 2.3.4.8, “Starting MySQL as a Windows Service”</a>.
    </p><p>
      The following examples show other common error messages you might
      encounter when installing MySQL and starting the server for the
      first time:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          If the MySQL server cannot find the <code class="literal">mysql</code>
          privileges database or other critical files, it displays these
          messages:
        </p><pre data-lang="none" class="programlisting">System error 1067 has occurred.
Fatal error: Can't open and lock privilege tables:
Table 'mysql.user' doesn't exist</pre><p>
          These messages often occur when the MySQL base or data
          directories are installed in different locations than the
          default locations (<code class="filename">C:\Program Files\MySQL\MySQL
          Server 8.0</code> and <code class="filename">C:\Program
          Files\MySQL\MySQL Server 8.0\data</code>,
          respectively).
        </p><p>
          This situation can occur when MySQL is upgraded and installed
          to a new location, but the configuration file is not updated
          to reflect the new location. In addition, old and new
          configuration files might conflict. Be sure to delete or
          rename any old configuration files when upgrading MySQL.
        </p><p>
          If you have installed MySQL to a directory other than
          <code class="filename">C:\Program Files\MySQL\MySQL Server
          8.0</code>, ensure that the MySQL server is
          aware of this through the use of a configuration
          (<code class="filename">my.ini</code>) file. Put the
          <code class="filename">my.ini</code> file in your Windows directory,
          typically <code class="filename">C:\WINDOWS</code>. To determine its
          exact location from the value of the <code class="literal">WINDIR</code>
          environment variable, issue the following command from the
          command prompt:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>echo %WINDIR%</code></strong>
</pre><p>
          You can create or modify an option file with any text editor,
          such as Notepad. For example, if MySQL is installed in
          <code class="filename">E:\mysql</code> and the data directory is
          <code class="filename">D:\MySQLdata</code>, you can create the option
          file and set up a <code class="literal">[mysqld]</code> section to
          specify values for the <code class="option">basedir</code> and
          <code class="option">datadir</code> options:
        </p><pre data-lang="ini" class="programlisting">[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=D:/MySQLdata</pre><p>
          Microsoft Windows path names are specified in option files
          using (forward) slashes rather than backslashes. If you do use
          backslashes, double them:
        </p><pre data-lang="ini" class="programlisting">[mysqld]
# set basedir to your installation path
basedir=C:\\Program Files\\MySQL\\MySQL Server 8.0
# set datadir to the location of your data directory
datadir=D:\\MySQLdata</pre><p>
          The rules for use of backslash in option file values are given
          in <a class="xref" href="programs.html#option-files" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>.
        </p><p>
          If you change the <code class="option">datadir</code> value in your MySQL
          configuration file, you must move the contents of the existing
          MySQL data directory before restarting the MySQL server.
        </p><p>
          See <a class="xref" href="installing.html#windows-create-option-file" title="2.3.4.2 Creating an Option File">Section 2.3.4.2, “Creating an Option File”</a>.
        </p></li><li class="listitem"><p>
          If you reinstall or upgrade MySQL without first stopping and
          removing the existing MySQL service and install MySQL using
          the MySQL Installer, you might see this error:
        </p><pre data-lang="none" class="programlisting">Error: Cannot create Windows service for MySql. Error: 0</pre><p>
          This occurs when the Configuration Wizard tries to install the
          service and finds an existing service with the same name.
        </p><p>
          One solution to this problem is to choose a service name other
          than <code class="literal">mysql</code> when using the configuration
          wizard. This enables the new service to be installed
          correctly, but leaves the outdated service in place. Although
          this is harmless, it is best to remove old services that are
          no longer in use.
        </p><p>
          To permanently remove the old <code class="literal">mysql</code>
          service, execute the following command as a user with
          administrative privileges, on the command line:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>SC DELETE mysql</code></strong>
[SC] DeleteService SUCCESS
</pre><p>
          If the <code class="literal">SC</code> utility is not available for your
          version of Windows, download the <code class="literal">delsrv</code>
          utility from
          <a class="ulink" href="http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp" target="_top">http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp</a>
          and use the <code class="literal">delsrv mysql</code> syntax.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-postinstallation"></a>2.3.6 Windows Postinstallation Procedures</h3>

</div>

</div>

</div>
<p>
      GUI tools exist that perform most of the tasks described in this
      section, including:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <a class="link" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">MySQL Installer</a>: Used to install
          and upgrade MySQL products.
        </p></li><li class="listitem"><p>
          <a class="link" href="workbench.html" title="Chapter 31 MySQL Workbench">MySQL Workbench</a>: Manages the
          MySQL server and edits SQL statements.
</p></li></ul>
</div>
<p>
      If necessary, initialize the data directory and create the MySQL
      grant tables. Windows installation operations performed by MySQL Installer
      initialize the data directory automatically. For installation from
      a ZIP Archive package, initialize the data directory as described
      at <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
    </p><p>
      Regarding passwords, if you installed MySQL using the MySQL Installer, you
      may have already assigned a password to the initial
      <code class="literal">root</code> account. (See
      <a class="xref" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">Section 2.3.3, “MySQL Installer for Windows”</a>.) Otherwise, use the
      password-assignment procedure given in
      <a class="xref" href="installing.html#default-privileges" title="2.10.4 Securing the Initial MySQL Account">Section 2.10.4, “Securing the Initial MySQL Account”</a>.
    </p><p>
      Before assigning a password, you might want to try running some
      client programs to make sure that you can connect to the server
      and that it is operating properly. Make sure that the server is
      running (see <a class="xref" href="installing.html#windows-server-first-start" title="2.3.4.5 Starting the Server for the First Time">Section 2.3.4.5, “Starting the Server for the First Time”</a>). You
      can also set up a MySQL service that runs automatically when
      Windows starts (see <a class="xref" href="installing.html#windows-start-service" title="2.3.4.8 Starting MySQL as a Windows Service">Section 2.3.4.8, “Starting MySQL as a Windows Service”</a>).
    </p><p>
      These instructions assume that your current location is the MySQL
      installation directory and that it has a <code class="filename">bin</code>
      subdirectory containing the MySQL programs used here. If that is
      not true, adjust the command path names accordingly.
    </p><p>
      If you installed MySQL using MySQL Installer (see
      <a class="xref" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">Section 2.3.3, “MySQL Installer for Windows”</a>), the default installation
      directory is <code class="filename">C:\Program Files\MySQL\MySQL Server
      8.0</code>:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>cd "C:\Program Files\MySQL\MySQL Server 8.0"</code></strong>
</pre><p>
      A common installation location for installation from a ZIP archive
      is <code class="filename">C:\mysql</code>:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>cd C:\mysql</code></strong>
</pre><a class="indexterm" name="idm46444442284384"></a><a class="indexterm" name="idm46444442283296"></a><p>
      Alternatively, add the <code class="filename">bin</code> directory to your
      <code class="literal">PATH</code> environment variable setting. That enables
      your command interpreter to find MySQL programs properly, so that
      you can run a program by typing only its name, not its path name.
      See <a class="xref" href="installing.html#mysql-installation-windows-path" title="2.3.4.7 Customizing the PATH for MySQL Tools">Section 2.3.4.7, “Customizing the PATH for MySQL Tools”</a>.
    </p><p>
      With the server running, issue the following commands to verify
      that you can retrieve information from the server. The output
      should be similar to that shown here.
    </p><p>
      Use <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a> to see what databases exist:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>bin\mysqlshow</code></strong>
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
</pre><p>
      The list of installed databases may vary, but always includes at
      least <code class="literal">mysql</code> and
      <code class="literal">information_schema</code>.
    </p><p>
      The preceding command (and commands for other MySQL programs such
      as <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>) may not work if the correct MySQL
      account does not exist. For example, the program may fail with an
      error, or you may not be able to view all databases. If you
      install MySQL using MySQL Installer, the <code class="literal">root</code> user is
      created automatically with the password you supplied. In this
      case, you should use the <code class="option">-u root</code> and
      <code class="option">-p</code> options. (You must use those options if you
      have already secured the initial MySQL accounts.) With
      <code class="option">-p</code>, the client program prompts for the
      <code class="literal">root</code> password. For example:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>bin\mysqlshow -u root -p</code></strong>
Enter password: <em class="replaceable"><code>(enter root password here)</code></em>
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
</pre><p>
      If you specify a database name, <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a>
      displays a list of the tables within the database:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>bin\mysqlshow mysql</code></strong>
Database: mysql
+---------------------------+
|          Tables           |
+---------------------------+
| columns_priv              |
| component                 |
| db                        |
| default_roles             |
| engine_cost               |
| func                      |
| general_log               |
| global_grants             |
| gtid_executed             |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| password_history          |
| plugin                    |
| procs_priv                |
| proxies_priv              |
| role_edges                |
| server_cost               |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
</pre><p>
      Use the <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> program to select information
      from a table in the <code class="literal">mysql</code> database:
    </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>bin\mysql -e "SELECT User, Host, plugin FROM mysql.user" mysql</code></strong>
+------+-----------+-----------------------+
| User | Host      | plugin                |
+------+-----------+-----------------------+
| root | localhost | caching_sha2_password |
+------+-----------+-----------------------+
</pre><p>
      For more information about <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> and
      <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a>, see <a class="xref" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client">Section 4.5.1, “<span class="command"><strong>mysql</strong></span> — The MySQL Command-Line Client”</a>, and
      <a class="xref" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information">Section 4.5.7, “<span class="command"><strong>mysqlshow</strong></span> — Display Database, Table, and Column Information”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-restrictions"></a>2.3.7 Windows Platform Restrictions</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444442251360"></a><p>
      The following restrictions apply to use of MySQL on the Windows
      platform:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <span class="bold"><strong>Process memory</strong></span>
        </p><p>
          On Windows 32-bit platforms, it is not possible by default to
          use more than 2GB of RAM within a single process, including
          MySQL. This is because the physical address limit on Windows
          32-bit is 4GB and the default setting within Windows is to
          split the virtual address space between kernel (2GB) and
          user/applications (2GB).
        </p><p>
          Some versions of Windows have a boot time setting to enable
          larger applications by reducing the kernel application.
          Alternatively, to use more than 2GB, use a 64-bit version of
          Windows.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>File system aliases</strong></span>
        </p><p>
          When using <code class="literal">MyISAM</code> tables, you cannot use
          aliases within Windows link to the data files on another
          volume and then link back to the main MySQL
          <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">datadir</code></a> location.
        </p><p>
          This facility is often used to move the data and index files
          to a RAID or other fast solution.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Limited number of ports</strong></span>
        </p><p>
          Windows systems have about 4,000 ports available for client
          connections, and after a connection on a port closes, it takes
          two to four minutes before the port can be reused. In
          situations where clients connect to and disconnect from the
          server at a high rate, it is possible for all available ports
          to be used up before closed ports become available again. If
          this happens, the MySQL server appears to be unresponsive even
          though it is running. Ports may be used by other applications
          running on the machine as well, in which case the number of
          ports available to MySQL is lower.
        </p><p>
          For more information about this problem, see
          <a class="ulink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;196271" target="_top">http://support.microsoft.com/default.aspx?scid=kb;en-us;196271</a>.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong><code class="literal">DATA DIRECTORY</code> and
          <code class="literal">INDEX DIRECTORY</code></strong></span>
        </p><p>
          The <code class="literal">DATA DIRECTORY</code> clause of the
          <a class="link" href="sql-statements.html#create-table" title="13.1.20 CREATE TABLE Statement"><code class="literal">CREATE TABLE</code></a> statement is
          supported on Windows for <code class="literal">InnoDB</code> tables
          only, as described in
          <a class="xref" href="innodb-storage-engine.html#innodb-create-table-external" title="15.6.1.2 Creating Tables Externally">Section 15.6.1.2, “Creating Tables Externally”</a>. For
          <code class="literal">MyISAM</code> and other storage engines, the
          <code class="literal">DATA DIRECTORY</code> and <code class="literal">INDEX
          DIRECTORY</code> clauses for <a class="link" href="sql-statements.html#create-table" title="13.1.20 CREATE TABLE Statement"><code class="literal">CREATE
          TABLE</code></a> are ignored on Windows and any other platforms
          with a nonfunctional <code class="literal">realpath()</code> call.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong><a class="link" href="sql-statements.html#drop-database" title="13.1.24 DROP DATABASE Statement"><code class="literal">DROP
          DATABASE</code></a></strong></span>
        </p><p>
          You cannot drop a database that is in use by another session.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Case-insensitive names</strong></span>
        </p><p>
          File names are not case-sensitive on Windows, so MySQL
          database and table names are also not case-sensitive on
          Windows. The only restriction is that database and table names
          must be specified using the same case throughout a given
          statement. See <a class="xref" href="language-structure.html#identifier-case-sensitivity" title="9.2.3 Identifier Case Sensitivity">Section 9.2.3, “Identifier Case Sensitivity”</a>.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Directory and file names</strong></span>
        </p><p>
          On Windows, MySQL Server supports only directory and file
          names that are compatible with the current ANSI code pages.
          For example, the following Japanese directory name will not
          work in the Western locale (code page 1252):
        </p><pre data-lang="ini" class="programlisting">datadir="C:/私たちのプロジェクトのデータ"</pre><p>
          The same limitation applies to directory and file names
          referred to in SQL statements, such as the data file path name
          in <a class="link" href="sql-statements.html#load-data" title="13.2.7 LOAD DATA Statement"><code class="literal">LOAD DATA</code></a>.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>The <code class="literal">\</code> path name
          separator character</strong></span>
        </p><p>
          Path name components in Windows are separated by the
          <code class="literal">\</code> character, which is also the escape
          character in MySQL. If you are using <a class="link" href="sql-statements.html#load-data" title="13.2.7 LOAD DATA Statement"><code class="literal">LOAD
          DATA</code></a> or
          <a class="link" href="sql-statements.html#select-into" title="13.2.10.1 SELECT ... INTO Statement"><code class="literal">SELECT ... INTO
          OUTFILE</code></a>, use Unix-style file names with
          <code class="literal">/</code> characters:
        </p><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>LOAD DATA INFILE 'C:/tmp/skr.txt' INTO TABLE skr;</code></strong>
mysql&gt; <strong class="userinput"><code>SELECT * INTO OUTFILE 'C:/tmp/skr.txt' FROM skr;</code></strong>
</pre><p>
          Alternatively, you must double the <code class="literal">\</code>
          character:
        </p><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>LOAD DATA INFILE 'C:\\tmp\\skr.txt' INTO TABLE skr;</code></strong>
mysql&gt; <strong class="userinput"><code>SELECT * INTO OUTFILE 'C:\\tmp\\skr.txt' FROM skr;</code></strong>
</pre></li><li class="listitem"><p>
          <span class="bold"><strong>Problems with pipes</strong></span>
        </p><p>
          Pipes do not work reliably from the Windows command-line
          prompt. If the pipe includes the character
          <code class="literal">^Z</code> / <code class="literal">CHAR(24)</code>, Windows
          thinks that it has encountered end-of-file and aborts the
          program.
        </p><p>
          This is mainly a problem when you try to apply a binary log as
          follows:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>mysqlbinlog <em class="replaceable"><code>binary_log_file</code></em> | mysql --user=root</code></strong>
</pre><p>
          If you have a problem applying the log and suspect that it is
          because of a <code class="literal">^Z</code> /
          <code class="literal">CHAR(24)</code> character, you can use the
          following workaround:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>mysqlbinlog <em class="replaceable"><code>binary_log_file</code></em> --result-file=/tmp/bin.sql</code></strong>
C:\&gt; <strong class="userinput"><code>mysql --user=root --execute "source /tmp/bin.sql"</code></strong>
</pre><p>
          The latter command also can be used to reliably read any SQL
          file that may contain binary data.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="osx-installation"></a>2.4 Installing MySQL on macOS</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#osx-installation-notes">2.4.1 General Notes on Installing MySQL on macOS</a></span></dt><dt><span class="section"><a href="installing.html#osx-installation-pkg">2.4.2 Installing MySQL on macOS Using Native Packages</a></span></dt><dt><span class="section"><a href="installing.html#osx-installation-launchd">2.4.3 Installing and Using the MySQL Launch Daemon</a></span></dt><dt><span class="section"><a href="installing.html#osx-installation-prefpane">2.4.4 Installing and Using the MySQL Preference Pane</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444442191360"></a><a class="indexterm" name="idm46444442189904"></a><p>
    For a list of macOS versions that the MySQL server supports, see
    <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_top">https://www.mysql.com/support/supportedplatforms/database.html</a>.
  </p><p>
    MySQL for macOS is available in a number of different forms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        Native Package Installer, which uses the native macOS installer
        (DMG) to walk you through the installation of MySQL. For more
        information, see <a class="xref" href="installing.html#osx-installation-pkg" title="2.4.2 Installing MySQL on macOS Using Native Packages">Section 2.4.2, “Installing MySQL on macOS Using Native Packages”</a>. You can
        use the package installer with macOS. The user you use to
        perform the installation must have administrator privileges.
      </p></li><li class="listitem"><p>
        Compressed TAR archive, which uses a file packaged using the
        Unix <span class="command"><strong>tar</strong></span> and <span class="command"><strong>gzip</strong></span>
        commands. To use this method, you will need to open a
        <span class="command"><strong>Terminal</strong></span> window. You do not need
        administrator privileges using this method, as you can install
        the MySQL server anywhere using this method. For more
        information on using this method, you can use the generic
        instructions for using a tarball,
        <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>.
      </p><p>
        In addition to the core installation, the Package Installer also
        includes <a class="xref" href="installing.html#osx-installation-launchd" title="2.4.3 Installing and Using the MySQL Launch Daemon">Section 2.4.3, “Installing and Using the MySQL Launch Daemon”</a> and
        <a class="xref" href="installing.html#osx-installation-prefpane" title="2.4.4 Installing and Using the MySQL Preference Pane">Section 2.4.4, “Installing and Using the MySQL Preference Pane”</a> to simplify the
        management of your installation.
</p></li></ul>
</div>
<p>
    For additional information on using MySQL on macOS, see
    <a class="xref" href="installing.html#osx-installation-notes" title="2.4.1 General Notes on Installing MySQL on macOS">Section 2.4.1, “General Notes on Installing MySQL on macOS”</a>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="osx-installation-notes"></a>2.4.1 General Notes on Installing MySQL on macOS</h3>
</div>
</div>
</div>
<p>
      You should keep the following issues and notes in mind:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <span class="bold"><strong>Other MySQL installations</strong></span>:
          The installation procedure does not recognize MySQL
          installations by package managers such as Homebrew. The
          installation and upgrade process is for MySQL packages
          provided by us. If other installations are present, then
          consider stopping them before executing this installer to
          avoid port conflicts.
        </p><p>
          <span class="bold"><strong>Homebrew</strong></span>: For example, if you
          installed MySQL Server using Homebrew to its default location
          then the MySQL installer installs to a different location and
          won't upgrade the version from Homebrew. In this scenario you
          would end up with multiple MySQL installations that, by
          default, attempt to use the same ports. Stop the other MySQL
          Server instances before running this installer, such as
          executing <span class="emphasis"><em>brew services stop mysql</em></span> to
          stop the Homebrew's MySQL service.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Launchd</strong></span>: A launchd daemon is
          installed that alters MySQL configuration options. Consider
          editing it if needed, see the documentation below for
          additional information. Also, macOS 10.10 removed startup item
          support in favor of launchd daemons. The optional MySQL
          preference pane under macOS <span class="guilabel">System
          Preferences</span> uses the launchd daemon.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Users</strong></span>: You may need (or want)
          to create a specific <code class="literal">mysql</code> user to own the
          MySQL directory and data. You can do this through the
          <span class="command"><strong>Directory Utility</strong></span>, and the
          <code class="literal">mysql</code> user should already exist. For use in
          single user mode, an entry for <code class="literal">_mysql</code> (note
          the underscore prefix) should already exist within the system
          <code class="filename">/etc/passwd</code> file.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Data</strong></span>: Because the MySQL
          package installer installs the MySQL contents into a version
          and platform specific directory, you can use this to upgrade
          and migrate your database between versions. You will need to
          either copy the <code class="filename">data</code> directory from the
          old version to the new version, or alternatively specify an
          alternative <code class="option">datadir</code> value to set location of
          the data directory. By default, the MySQL directories are
          installed under <code class="filename">/usr/local/</code>.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Aliases</strong></span>: You might want to
          add aliases to your shell's resource file to make it easier to
          access commonly used programs such as <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>
          and <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> from the command line. The
          syntax for <span class="command"><strong>bash</strong></span> is:
        </p><pre data-lang="terminal" class="programlisting">alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin</pre><p>
          For <span class="command"><strong>tcsh</strong></span>, use:
        </p><pre data-lang="terminal" class="programlisting">alias mysql /usr/local/mysql/bin/mysql
alias mysqladmin /usr/local/mysql/bin/mysqladmin</pre><p>
          Even better, add <code class="literal">/usr/local/mysql/bin</code> to
          your <code class="literal">PATH</code> environment variable. You can do
          this by modifying the appropriate startup file for your shell.
          For more information, see <a class="xref" href="programs.html#invoking-programs" title="4.2.1 Invoking MySQL Programs">Section 4.2.1, “Invoking MySQL Programs”</a>.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Removing</strong></span>: After you have
          copied over the MySQL database files from the previous
          installation and have successfully started the new server, you
          should consider removing the old installation files to save
          disk space. Additionally, you should also remove older
          versions of the Package Receipt directories located in
          <code class="filename">/Library/Receipts/mysql-<em class="replaceable"><code>VERSION</code></em>.pkg</code>.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Legacy</strong></span>: Prior to OS X 10.7,
          MySQL server was bundled with OS X Server.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="osx-installation-pkg"></a>2.4.2 Installing MySQL on macOS Using Native Packages</h3>

</div>

</div>

</div>
<p>
      The package is located inside a disk image
      (<code class="literal">.dmg</code>) file that you first need to mount by
      double-clicking its icon in the Finder. It should then mount the
      image and display its contents.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Before proceeding with the installation, be sure to stop all
        running MySQL server instances by using either the MySQL Manager
        Application (on macOS Server), the preference pane, or
        <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin shutdown</strong></span></a> on the command line.
</p>
</div>
<p>
      To install MySQL using the package installer:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Download the disk image (<code class="filename">.dmg</code>) file (the
          community version is available
          <a class="ulink" href="https://dev.mysql.com/downloads/mysql/" target="_top">here</a>) that
          contains the MySQL package installer. Double-click the file to
          mount the disk image and see its contents.
        </p><p>
          Double-click the MySQL installer package from the disk. It is
          named according to the version of MySQL you have downloaded.
          For example, for MySQL server 8.0.22 it might be
          named
          <code class="filename">mysql-8.0.22-osx-<em class="replaceable"><code>10.13-x86_64</code></em>.pkg</code>.
        </p></li><li class="listitem"><p>
          The initial wizard introduction screen references the MySQL
          server version to install. Click
          <span class="guibutton">Continue</span> to begin the installation.
        </p><p>
          The MySQL community edition shows a copy of the relevant GNU
          General Public License. Click <span class="guibutton">Continue</span>
          and then <span class="guibutton">Agree</span> to continue.
        </p></li><li class="listitem"><p>
          From the <span class="guilabel">Installation Type</span> page you can
          either click <span class="guibutton">Install</span> to execute the
          installation wizard using all defaults, click
          <span class="guibutton">Customize</span> to alter which components to
          install (MySQL server, MySQL Test, Preference Pane, Launchd
          Support -- all but MySQL Test are enabled by default).
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            Although the <span class="guibutton">Change Install Location</span>
            option is visible, the installation location cannot be
            changed.
</p>
</div>

<div class="figure">
<a name="mac-installer-installation-type-main"></a><p class="title"><b>Figure 2.13 MySQL Package Installer Wizard: Installation Type</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-installation-type-standard.png" width="621" height="438" alt="Content is described in the surrounding text.">
</div>

</div>

</div>
<br class="figure-break">
<div class="figure">
<a name="mac-installer-installation-customize-main"></a><p class="title"><b>Figure 2.14 MySQL Package Installer Wizard: Customize</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-installation-type-customize.png" width="622" height="439" alt="Customize shows three package name options: MySQL Server, MySQL Test, Preference Pane, and Launchd Support. All three options are checked.">
</div>

</div>

</div>
<br class="figure-break"></li><li class="listitem"><p>
          Click <span class="guibutton">Install</span> to install MySQL Server.
          The installation process ends here if upgrading a current
          MySQL Server installation, otherwise follow the wizard's
          additional configuration steps for your new MySQL Server
          installation.
        </p></li><li class="listitem"><p>
          After a successful new MySQL Server installation, complete the
          configuration steps by choosing the default encryption type
          for passwords, define the root password, and also enable (or
          disable) MySQL server at startup.
        </p></li><li class="listitem"><p>
          The default MySQL 8.0 password mechanism is
          <code class="literal">caching_sha2_password</code> (Strong), and this
          step allows you to change it to
          <code class="literal">mysql_native_password</code> (Legacy).
</p>
<div class="figure">
<a name="mac-installer-installation-encryption-type"></a><p class="title"><b>Figure 2.15 MySQL Package Installer Wizard: Choose a Password Encryption Type</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-configuration-password-type.png" width="621" height="438" alt='Most content is described in the surrounding text. The installer refers to caching_sha2_password as "Use Strong Password Encryption" and mysql_native_password as a "Use Legacy Password Encryption".'>
</div>

</div>

</div>
<br class="figure-break"><p>
          Choosing the legacy password mechanism alters the generated
          launchd file to set
          <code class="literal">--default_authentication_plugin=mysql_native_password</code>
          under <code class="literal">ProgramArguments</code>. Choosing strong
          password encryption does not set
          <code class="literal">--default_authentication_plugin</code> because the
          default MySQL Server value is used, which is
          <code class="literal">caching_sha2_password</code>.
        </p></li><li class="listitem"><p>
          Define a password for the root user, and also toggle whether
          MySQL Server should start after the configuration step is
          complete.
</p>
<div class="figure">
<a name="mac-installer-installation-root-pass"></a><p class="title"><b>Figure 2.16 MySQL Package Installer Wizard: Define Root Password</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-configuration-password-define.png" width="621" height="438" alt="Content is described in the surrounding text.">
</div>

</div>

</div>
<br class="figure-break"></li><li class="listitem"><p>
          <span class="guilabel">Summary</span> is the final step and references
          a successful and complete MySQL Server installation.
          <span class="guibutton">Close</span> the wizard.
</p>
<div class="figure">
<a name="mac-installer-installation-summary"></a><p class="title"><b>Figure 2.17 MySQL Package Installer Wizard: Summary</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-summary.png" width="621" height="438" alt="Shows that the installation was a success, and includes links to the MySQL manual, mysql.com, and oracle.com.">
</div>

</div>

</div>
<br class="figure-break"></li></ol>
</div>
<p>
      MySQL server is now installed. If you chose to not start MySQL,
      then use either launchctl from the command line or start MySQL by
      clicking "Start" using the MySQL preference pane. For additional
      information, see <a class="xref" href="installing.html#osx-installation-launchd" title="2.4.3 Installing and Using the MySQL Launch Daemon">Section 2.4.3, “Installing and Using the MySQL Launch Daemon”</a>, and
      <a class="xref" href="installing.html#osx-installation-prefpane" title="2.4.4 Installing and Using the MySQL Preference Pane">Section 2.4.4, “Installing and Using the MySQL Preference Pane”</a>. Use the MySQL
      Preference Pane or launchd to configure MySQL to automatically
      start at bootup.
    </p><p>
      When installing using the package installer, the files are
      installed into a directory within <code class="filename">/usr/local</code>
      matching the name of the installation version and platform. For
      example, the installer file
      <code class="filename">mysql-8.0.22-<em class="replaceable"><code>osx10.13-x86_64.dmg</code></em></code>
      installs MySQL into
      <code class="filename">/usr/local/mysql-8.0.22-osx10.13-x86_64/
      </code> with a symlink to
      <code class="filename">/usr/local/mysql</code>. The following table shows
      the layout of this MySQL installation directory.
</p>
<div class="table">
<a name="mysql-installation-layout-osx"></a><p class="title"><b>Table 2.6 MySQL Installation Layout on macOS</b></p>
<div class="table-contents">
<table><col width="45%"><col width="55%"><thead><tr>
          <th scope="col">Directory</th>
          <th scope="col">Contents of Directory</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="filename">bin</code></td>
          <td><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server, client and utility programs</td>
        </tr><tr>
          <td scope="row"><code class="filename">data</code></td>
          <td>Log files, databases, where
            <code class="filename">/usr/local/mysql/data/mysqld.local.err</code>
            is the default error log</td>
        </tr><tr>
          <td scope="row"><code class="filename">docs</code></td>
          <td>Helper documents, like the Release Notes and build information</td>
        </tr><tr>
          <td scope="row"><code class="filename">include</code></td>
          <td>Include (header) files</td>
        </tr><tr>
          <td scope="row"><code class="filename">lib</code></td>
          <td>Libraries</td>
        </tr><tr>
          <td scope="row"><code class="filename">man</code></td>
          <td>Unix manual pages</td>
        </tr><tr>
          <td scope="row"><code class="filename">mysql-test</code></td>
          <td>MySQL test suite ('MySQL Test' is disabled by default during the
            installation process when using the installer package (DMG))</td>
        </tr><tr>
          <td scope="row"><code class="filename">share</code></td>
          <td>Miscellaneous support files, including error messages, sample
            configuration files, SQL for database installation</td>
        </tr><tr>
          <td scope="row"><code class="filename">support-files</code></td>
          <td>Scripts and sample configuration files</td>
        </tr><tr>
          <td scope="row"><code class="filename">/tmp/mysql.sock</code></td>
          <td>Location of the MySQL Unix socket</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="osx-installation-launchd"></a>2.4.3 Installing and Using the MySQL Launch Daemon</h3>

</div>

</div>

</div>
<p>
      macOS uses launch daemons to automatically start, stop, and manage
      processes and applications such as MySQL.
    </p><p>
      By default, the installation package (DMG) on macOS installs a
      launchd file named
      <code class="filename">/Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist</code>
      that contains a plist definition similar to:
    </p><pre data-lang="terminal" class="programlisting">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;             &lt;string&gt;com.oracle.oss.mysql.mysqld&lt;/string&gt;
    &lt;key&gt;ProcessType&lt;/key&gt;       &lt;string&gt;Interactive&lt;/string&gt;
    &lt;key&gt;Disabled&lt;/key&gt;          &lt;false/&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;         &lt;true/&gt;
    &lt;key&gt;KeepAlive&lt;/key&gt;         &lt;true/&gt;
    &lt;key&gt;SessionCreate&lt;/key&gt;     &lt;true/&gt;
    &lt;key&gt;LaunchOnlyOnce&lt;/key&gt;    &lt;false/&gt;
    &lt;key&gt;UserName&lt;/key&gt;          &lt;string&gt;_mysql&lt;/string&gt;
    &lt;key&gt;GroupName&lt;/key&gt;         &lt;string&gt;_mysql&lt;/string&gt;
    &lt;key&gt;ExitTimeOut&lt;/key&gt;       &lt;integer&gt;600&lt;/integer&gt;
    &lt;key&gt;Program&lt;/key&gt;           &lt;string&gt;/usr/local/mysql/bin/mysqld&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
        &lt;array&gt;
            &lt;string&gt;/usr/local/mysql/bin/mysqld&lt;/string&gt;
            &lt;string&gt;--user=_mysql&lt;/string&gt;
            &lt;string&gt;--basedir=/usr/local/mysql&lt;/string&gt;
            &lt;string&gt;--datadir=/usr/local/mysql/data&lt;/string&gt;
            &lt;string&gt;--plugin-dir=/usr/local/mysql/lib/plugin&lt;/string&gt;
            &lt;string&gt;--log-error=/usr/local/mysql/data/mysqld.local.err&lt;/string&gt;
            &lt;string&gt;--pid-file=/usr/local/mysql/data/mysqld.local.pid&lt;/string&gt;
            &lt;string&gt;--keyring-file-data=/usr/local/mysql/keyring/keyring&lt;/string&gt;
            &lt;string&gt;--early-plugin-load=keyring_file=keyring_file.so&lt;/string&gt;
        &lt;/array&gt;
    &lt;key&gt;WorkingDirectory&lt;/key&gt;  &lt;string&gt;/usr/local/mysql&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;

</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Some users report that adding a plist DOCTYPE declaration causes
        the launchd operation to fail, despite it passing the lint
        check. We suspect it's a copy-n-paste error. The md5 checksum of
        a file containing the above snippet is
        <span class="emphasis"><em>d925f05f6d1b6ee5ce5451b596d6baed</em></span>.
</p>
</div>
<p>
      To enable the launchd service, you can either:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Open macOS system preferences and select the MySQL preference
          panel, and then execute <span class="guibutton">Start MySQL
          Server</span>.
</p>
<div class="figure">
<a name="mac-installer-preference-pane-location-launchd"></a><p class="title"><b>Figure 2.18 MySQL Preference Pane: Location</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-preference-pane-location.png" width="668" height="598" alt='Shows "MySQL" typed into the macOS System Preferences search box, and a highlighted "MySQL" icon in the bottom left.'>
</div>

</div>

</div>
<br class="figure-break"><p>
          The <span class="guilabel">Instances</span> page includes an option to
          start or stop MySQL, and <span class="guibutton">Initialize
          Database</span> recreates the <code class="filename">data/</code>
          directory. <span class="guibutton">Uninstall</span> uninstalls MySQL
          Server and optionally the MySQL preference panel and launchd
          information.
</p>
<div class="figure">
<a name="mac-installer-preference-pane-instances-launchd"></a><p class="title"><b>Figure 2.19 MySQL Preference Pane: Instances</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-preference-pane-instances.png" width="668" height="548" alt='The left side shows a list of MySQL instances separated by "Active Instance", "Installed Instances", and "Data Directories" sections. The right side shows a "Stop MySQL Server" button, a checkbox titled "Start MySQL when your computer starts up", and "Initialize Database" and "Uninstall" buttons. Several fields reference 8.0.11 as the current installed MySQL version.'>
</div>

</div>

</div>
<br class="figure-break"></li><li class="listitem"><p>
          Or, manually load the launchd file.
        </p><pre data-lang="terminal" class="programlisting">shell&gt; cd /Library/LaunchDaemons
shell&gt; sudo launchctl load -F com.oracle.oss.mysql.mysqld.plist
        </pre></li><li class="listitem"><p>
          To configure MySQL to automatically start at bootup, you can:
</p><pre data-lang="terminal" class="programlisting">shell&gt; sudo launchctl load -w com.oracle.oss.mysql.mysqld.plist</pre></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
        When upgrading MySQL server, the launchd installation process
        will remove the old startup items that were installed with MySQL
        server 5.7.7 and below.
      </p><p>
        Also, upgrading will replace your existing launchd file named
        <code class="filename">com.oracle.oss.mysql.mysqld.plist</code>.
</p>
</div>
<p>
      Additional launchd related information:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The plist entries override <code class="filename">my.cnf</code>
          entries, because they are passed in as command line arguments.
          For additional information about passing in program options,
          see <a class="xref" href="programs.html#program-options" title="4.2.2 Specifying Program Options">Section 4.2.2, “Specifying Program Options”</a>.
        </p></li><li class="listitem"><p>
          The <span class="bold"><strong>ProgramArguments</strong></span> section
          defines the command line options that are passed into the
          program, which is the <code class="filename">mysqld</code> binary in
          this case.
        </p></li><li class="listitem"><p>
          The default plist definition is written with less
          sophisticated use cases in mind. For more complicated setups,
          you may want to remove some of the arguments and instead rely
          on a MySQL configuration file, such as
          <code class="filename">my.cnf</code>.
        </p></li><li class="listitem"><p>
          If you edit the plist file, then uncheck the installer option
          when reinstalling or upgrading MySQL. Otherwise, your edited
          plist file will be overwritten, and all edits will be lost.
</p></li></ul>
</div>
<p>
      Because the default plist definition defines several
      <span class="bold"><strong>ProgramArguments</strong></span>, you might
      remove most of these arguments and instead rely upon your
      <code class="filename">my.cnf</code> MySQL configuration file to define
      them. For example:
    </p><pre data-lang="terminal" class="programlisting">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;             &lt;string&gt;com.oracle.oss.mysql.mysqld&lt;/string&gt;
    &lt;key&gt;ProcessType&lt;/key&gt;       &lt;string&gt;Interactive&lt;/string&gt;
    &lt;key&gt;Disabled&lt;/key&gt;          &lt;false/&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;         &lt;true/&gt;
    &lt;key&gt;KeepAlive&lt;/key&gt;         &lt;true/&gt;
    &lt;key&gt;SessionCreate&lt;/key&gt;     &lt;true/&gt;
    &lt;key&gt;LaunchOnlyOnce&lt;/key&gt;    &lt;false/&gt;
    &lt;key&gt;UserName&lt;/key&gt;          &lt;string&gt;_mysql&lt;/string&gt;
    &lt;key&gt;GroupName&lt;/key&gt;         &lt;string&gt;_mysql&lt;/string&gt;
    &lt;key&gt;ExitTimeOut&lt;/key&gt;       &lt;integer&gt;600&lt;/integer&gt;
    &lt;key&gt;Program&lt;/key&gt;           &lt;string&gt;/usr/local/mysql/bin/mysqld&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
        &lt;array&gt;
            &lt;string&gt;/usr/local/mysql/bin/mysqld&lt;/string&gt;
            &lt;string&gt;--user=_mysql&lt;/string&gt;
            &lt;string&gt;--basedir=/usr/local/mysql&lt;/string&gt;
            &lt;string&gt;--datadir=/usr/local/mysql/data&lt;/string&gt;
            &lt;string&gt;--plugin-dir=/usr/local/mysql/lib/plugin&lt;/string&gt;
            &lt;string&gt;--log-error=/usr/local/mysql/data/mysqld.local.err&lt;/string&gt;
            &lt;string&gt;--pid-file=/usr/local/mysql/data/mysqld.local.pid&lt;/string&gt;
            &lt;string&gt;--keyring-file-data=/usr/local/mysql/keyring/keyring&lt;/string&gt;
            &lt;string&gt;--early-plugin-load=keyring_file=keyring_file.so&lt;/string&gt;
        &lt;/array&gt;
    &lt;key&gt;WorkingDirectory&lt;/key&gt;  &lt;string&gt;/usr/local/mysql&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;

   </pre><p>
      In this case, the <a class="link" href="server-administration.html#sysvar_basedir"><code class="literal">basedir</code></a>,
      <a class="link" href="server-administration.html#sysvar_datadir"><code class="literal">datadir</code></a>,
      <a class="link" href="server-administration.html#sysvar_plugin_dir"><code class="literal">plugin_dir</code></a>,
      <a class="link" href="server-administration.html#sysvar_log_error"><code class="literal">log_error</code></a>,
      <a class="link" href="server-administration.html#sysvar_pid_file"><code class="literal">pid_file</code></a>,
      <a class="link" href="security.html#sysvar_keyring_file_data"><code class="literal">keyring_file_data</code></a>, and
      ﻿<a class="link" href="server-administration.html#option_mysqld_early-plugin-load"><code class="option">--early-plugin-load</code></a> options were
      removed from the default plist
      <span class="emphasis"><em>ProgramArguments</em></span> definition, which you might
      have defined in <code class="filename">my.cnf</code> instead.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="osx-installation-prefpane"></a>2.4.4 Installing and Using the MySQL Preference Pane</h3>

</div>

</div>

</div>
<p>
      The MySQL Installation Package includes a MySQL preference pane
      that enables you to start, stop, and control automated startup
      during boot of your MySQL installation.
    </p><p>
      This preference pane is installed by default, and is listed under
      your system's <span class="emphasis"><em>System Preferences</em></span> window.
</p>
<div class="figure">
<a name="mac-installer-preference-pane-location-initial"></a><p class="title"><b>Figure 2.20 MySQL Preference Pane: Location</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-preference-pane-location.png" width="668" height="598" alt='Shows "MySQL" typed into the macOS System Preferences search box, and a highlighted "MySQL" icon in the bottom left.'>
</div>

</div>

</div>
<br class="figure-break"><p>
      The MySQL preference pane is installed with the same DMG file that
      installs MySQL Server. Typically it is installed with MySQL Server
      but it can be installed by itself too.
    </p><p>
      To install the MySQL preference pane:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Go through the process of installing the MySQL server, as
          described in the documentation at
          <a class="xref" href="installing.html#osx-installation-pkg" title="2.4.2 Installing MySQL on macOS Using Native Packages">Section 2.4.2, “Installing MySQL on macOS Using Native Packages”</a>.
        </p></li><li class="listitem"><p>
          Click <span class="guibutton">Customize</span> at the
          <span class="guilabel">Installation Type</span> step. The "Preference
          Pane" option is listed there and enabled by default; make sure
          it is not deselected. The other options, such as MySQL Server,
          can be selected or deslected.
</p>
<div class="figure">
<a name="mac-installer-installation-customize-pane"></a><p class="title"><b>Figure 2.21 MySQL Package Installer Wizard: Customize</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-installation-type-customize.png" width="622" height="439" alt="Customize shows three package name options: MySQL Server, MySQL Test, Preference Pane, and Launchd Support. All three options are checked.">
</div>

</div>

</div>
<br class="figure-break"></li><li class="listitem"><p>
          Complete the installation process.
</p></li></ol>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
        The MySQL preference pane only starts and stops MySQL
        installation installed from the MySQL package installation that
        have been installed in the default location.
</p>
</div>
<p>
      Once the MySQL preference pane has been installed, you can control
      your MySQL server instance using this preference pane.
    </p><p>
      The <span class="guilabel">Instances</span> page includes an option to
      start and stop MySQL, and <span class="guibutton">Initialize
      Database</span> recreates the <code class="filename">data/</code>
      directory. <span class="guibutton">Uninstall</span> uninstalls MySQL
      Server and optionally the pain and launchd information.
    </p><p>
      The <span class="guilabel">Instances</span> page includes an option to
      start or stop MySQL, and <span class="guibutton">Initialize
      Database</span> recreates the <code class="filename">data/</code>
      directory. <span class="guibutton">Uninstall</span> uninstalls MySQL
      Server and optionally the MySQL preference panel and launchd
      information.
</p>
<div class="figure">
<a name="mac-installer-preference-pane-instances-instances"></a><p class="title"><b>Figure 2.22 MySQL Preference Pane: Instances</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-preference-pane-instances.png" width="668" height="548" alt='The left side shows a list of MySQL instances separated by "Active Instance", "Installed Instances", and "Data Directories" sections. The right side shows a "Stop MySQL Server" button, a checkbox titled "Start MySQL when your computer starts up", and "Initialize Database" and "Uninstall" buttons. Several fields reference 8.0.11 as the current installed MySQL version.'>
</div>

</div>

</div>
<br class="figure-break"><p>
      The <span class="guilabel">Configuration</span> page shows MySQL Server
      options including the path to the MySQL configuration file.
</p>
<div class="figure">
<a name="mac-installer-preference-pane-configuration"></a><p class="title"><b>Figure 2.23 MySQL Preference Pane: Configuration</b></p>
<div class="figure-contents">

<div class="mediaobject">
<img src="images/mac-installer-preference-pane-configuration.png" width="668" height="548" alt="Content is described in the surrounding text.">
</div>

</div>

</div>
<br class="figure-break"><p>
      The MySQL Preference Pane shows the current status of the MySQL
      server, showing <span class="guilabel">stopped</span> (in red) if the
      server is not running and <span class="guilabel">running</span> (in green)
      if the server has already been started. The preference pane also
      shows the current setting for whether the MySQL server has been
      set to start automatically.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="linux-installation"></a>2.5 Installing MySQL on Linux</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#linux-installation-yum-repo">2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-apt-repo">2.5.2 Installing MySQL on Linux Using the MySQL APT Repository</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-sles-repo">2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-rpm">2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-debian">2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-docker">2.5.6 Deploying MySQL on Linux with Docker</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-native">2.5.7 Installing MySQL on Linux from the Native Software Repositories</a></span></dt><dt><span class="section"><a href="installing.html#linux-installation-juju">2.5.8 Installing MySQL on Linux with Juju</a></span></dt><dt><span class="section"><a href="installing.html#using-systemd">2.5.9 Managing MySQL Server with systemd</a></span></dt></dl>
</div>
<p>
    Linux supports a number of different solutions for installing MySQL.
    We recommend that you use one of the distributions from Oracle, for
    which several methods for installation are available:
</p>
<div class="table">
<a name="linux-installation-methods"></a><p class="title"><b>Table 2.7 Linux Installation Methods and Information</b></p>
<div class="table-contents">
<table><col width="30%"><col width="30%"><col width="40%"><thead><tr>
        <th scope="col">Type</th>
        <th scope="col">Setup Method</th>
        <th scope="col">Additional Information</th>
      </tr></thead><tbody><tr>
        <td scope="row">Apt</td>
        <td>Enable the <a class="ulink" href="https://dev.mysql.com/downloads/repo/apt/" target="_top">MySQL Apt
          repository</a></td>
        <td><a class="link" href="installing.html#linux-installation-apt-repo" title="2.5.2 Installing MySQL on Linux Using the MySQL APT Repository">Documentation</a></td>
      </tr><tr>
        <td scope="row">Yum</td>
        <td>Enable the <a class="ulink" href="https://dev.mysql.com/downloads/repo/yum/" target="_top">MySQL Yum
          repository</a></td>
        <td><a class="link" href="installing.html#linux-installation-yum-repo" title="2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository">Documentation</a></td>
      </tr><tr>
        <td scope="row">Zypper</td>
        <td>Enable the <a class="ulink" href="https://dev.mysql.com/downloads/repo/suse/" target="_top">MySQL SLES
          repository</a></td>
        <td><a class="link" href="installing.html#linux-installation-sles-repo" title="2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository">Documentation</a></td>
      </tr><tr>
        <td scope="row">RPM</td>
        <td><a class="ulink" href="https://dev.mysql.com/downloads/mysql/" target="_top">Download</a> a specific
          package</td>
        <td><a class="link" href="installing.html#linux-installation-rpm" title="2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle">Documentation</a></td>
      </tr><tr>
        <td scope="row">DEB</td>
        <td><a class="ulink" href="https://dev.mysql.com/downloads/mysql/" target="_top">Download</a> a specific
          package</td>
        <td><a class="link" href="installing.html#linux-installation-debian" title="2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle">Documentation</a></td>
      </tr><tr>
        <td scope="row">Generic</td>
        <td><a class="ulink" href="https://dev.mysql.com/downloads/mysql/" target="_top">Download</a> a generic
          package</td>
        <td><a class="link" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Documentation</a></td>
      </tr><tr>
        <td scope="row">Source</td>
        <td>Compile from <a class="ulink" href="https://dev.mysql.com/downloads/mysql/" target="_top">source</a></td>
        <td><a class="link" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Documentation</a></td>
      </tr><tr>
        <td scope="row">Docker</td>
        <td>Use Docker Hub for MySQL Community Edition; download Docker image for MySQL Enterprise Edition from
          <a class="ulink" href="https://support.oracle.com/" target="_top">My Oracle
          Support</a></td>
        <td><a class="link" href="installing.html#linux-installation-docker" title="2.5.6 Deploying MySQL on Linux with Docker">Documentation</a></td>
      </tr><tr>
        <td scope="row">Oracle Unbreakable Linux Network</td>
        <td>Use ULN channels</td>
        <td><a class="link" href="installing.html#uln-installation" title="2.6 Installing MySQL Using Unbreakable Linux Network (ULN)">Documentation</a></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
    As an alternative, you can use the package manager on your system to
    automatically download and install MySQL with packages from the
    native software repositories of your Linux distribution. These
    native packages are often several versions behind the currently
    available release. You will also normally be unable to install
    development milestone releases (DMRs), as these are not usually made
    available in the native repositories. For more information on using
    the native package installers, see
    <a class="xref" href="installing.html#linux-installation-native" title="2.5.7 Installing MySQL on Linux from the Native Software Repositories">Section 2.5.7, “Installing MySQL on Linux from the Native Software Repositories”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      For many Linux installations, you will want to set up MySQL to be
      started automatically when your machine starts. Many of the native
      package installations perform this operation for you, but for
      source, binary and RPM solutions you may need to set this up
      separately. The required script, <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a>,
      can be found in the <code class="filename">support-files</code> directory
      under the MySQL installation directory or in a MySQL source tree.
      You can install it as <code class="filename">/etc/init.d/mysql</code> for
      automatic MySQL startup and shutdown. See
      <a class="xref" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script">Section 4.3.3, “<span class="command"><strong>mysql.server</strong></span> — MySQL Server Startup Script”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-yum-repo"></a>2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444441873472"></a><a class="indexterm" name="idm46444441872400"></a><p>
      The <a class="ulink" href="https://dev.mysql.com/downloads/repo/yum/" target="_top">MySQL Yum
      repository</a> for Oracle Linux, Red Hat Enterprise Linux,
      CentOS, and Fedora provides RPM packages for installing the MySQL
      server, client, MySQL Workbench, MySQL Utilities, MySQL Router,
      MySQL Shell, Connector/ODBC, Connector/Python and so on (not all
      packages are available for all the distributions; see
      <a class="xref" href="installing.html#yum-install-components" title="Installing Additional MySQL Products and Components with Yum">Installing Additional MySQL Products and Components with Yum</a> for details).
</p>
<h4><a name="idm46444441869088"></a>Before You Start</h4>
<p>
      As a popular, open-source software, MySQL, in its original or
      re-packaged form, is widely installed on many systems from various
      sources, including different software download sites, software
      repositories, and so on. The following instructions assume that
      MySQL is not already installed on your system using a
      third-party-distributed RPM package; if that is not the case,
      follow the instructions given in
      <a class="xref" href="installing.html#updating-yum-repo" title="2.11.7 Upgrading MySQL with the MySQL Yum Repository">Section 2.11.7, “Upgrading MySQL with the MySQL Yum Repository”</a> or
      <a class="ulink" href="https://dev.mysql.com/doc/refman/5.7/en/replace-third-party-yum.html" target="_top">Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository</a>.
</p>
<h4><a name="idm46444441865872"></a>Steps for a Fresh Installation of MySQL</h4>
<p>
      Follow the steps below to install the latest GA version of MySQL
      with the MySQL Yum repository:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem">
<h4><a name="yum-repo-setup"></a>Adding the MySQL Yum Repository</h4>
<p>
          First, add the MySQL Yum repository to your system's
          repository list. This is a one-time operation, which can be
          performed by installing an RPM provided by MySQL. Follow these
          steps:

</p>
<div class="orderedlist">
<ol class="orderedlist" type="a"><li class="listitem"><p>
                Go to the Download MySQL Yum Repository page
                (<a class="ulink" href="https://dev.mysql.com/downloads/repo/yum/" target="_top">https://dev.mysql.com/downloads/repo/yum/</a>)
                in the MySQL Developer Zone.
              </p></li><li class="listitem"><p>
                Select and download the release package for your
                platform.
              </p></li><li class="listitem"><p>
                Install the downloaded release package with the
                following command, replacing
                <em class="replaceable"><code>platform-and-version-specific-package-name</code></em>
                with the name of the downloaded RPM package:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum localinstall <em class="replaceable"><code>platform-and-version-specific-package-name</code></em>.rpm</code></strong>
</pre><p>
              </p><p>
                For an EL6-based system, the command is in the form of:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum localinstall mysql80-community-release-el6-<em class="replaceable"><code>{version-number}</code></em>.noarch.rpm</code></strong>
</pre><p>
              </p><p>
                For an EL7-based system:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum localinstall mysql80-community-release-el7-<em class="replaceable"><code>{version-number}</code></em>.noarch.rpm</code></strong>
</pre><p>
              </p><p>
                For an EL8-based system:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum localinstall mysql80-community-release-el8-<em class="replaceable"><code>{version-number}</code></em>.noarch.rpm</code></strong>
</pre><p>
              </p><p>
                For Fedora 31:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo dnf localinstall mysql80-community-release-fc31-<em class="replaceable"><code>{version-number}</code></em>.noarch.rpm</code></strong>
</pre><p>
              </p><p>
                For Fedora 30:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo dnf localinstall mysql80-community-release-fc30-<em class="replaceable"><code>{version-number}</code></em>.noarch.rpm</code></strong>
</pre><p>
              </p><p>
                The installation command adds the MySQL Yum repository
                to your system's repository list and downloads the GnuPG
                key to check the integrity of the software packages. See
                <a class="xref" href="installing.html#checking-gpg-signature" title="2.1.3.2 Signature Checking Using GnuPG">Section 2.1.3.2, “Signature Checking Using GnuPG”</a> for details on
                GnuPG key checking.
              </p><p>
                You can check that the MySQL Yum repository has been
                successfully added by the following command (for
                dnf-enabled systems, replace <span class="command"><strong>yum</strong></span> in
                the command with <span class="command"><strong>dnf</strong></span>):

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>yum repolist enabled | grep "mysql.*-community.*"</code></strong>
</pre><p>
</p></li></ol>
</div>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            Once the MySQL Yum repository is enabled on your system, any
            system-wide update by the <span class="command"><strong>yum update</strong></span>
            command (or <span class="command"><strong>dnf upgrade</strong></span> for dnf-enabled
            systems) will upgrade MySQL packages on your system and also
            replace any native third-party packages, if Yum finds
            replacements for them in the MySQL Yum repository; see
            <a class="xref" href="installing.html#updating-yum-repo" title="2.11.7 Upgrading MySQL with the MySQL Yum Repository">Section 2.11.7, “Upgrading MySQL with the MySQL Yum Repository”</a> and, for a discussion on
            some possible effects of that on your system, see
            <a class="xref" href="installing.html#updating-yum-repo-client-lib" title="Upgrading the Shared Client Libraries">Upgrading the Shared Client Libraries</a>.
</p>
</div>
</li><li class="listitem">
<h4><a name="yum-repo-select-series"></a>Selecting a Release Series</h4>
<p>
          When using the MySQL Yum repository, the latest GA series
          (currently MySQL 8.0) is selected for
          installation by default. If this is what you want, you can
          skip to the next step,
          <a class="xref" href="installing.html#yum-repo-installing-mysql" title="Installing MySQL">Installing MySQL</a>.
        </p><p>
          Within the MySQL Yum repository, different release series of
          the MySQL Community Server are hosted in different
          subrepositories. The subrepository for the latest GA series
          (currently MySQL 8.0) is enabled by default, and
          the subrepositories for all other series (for example, the
          MySQL 8.0 series) are disabled by default. Use this command to
          see all the subrepositories in the MySQL Yum repository, and
          see which of them are enabled or disabled (for dnf-enabled
          systems, replace <span class="command"><strong>yum</strong></span> in the command with
          <span class="command"><strong>dnf</strong></span>):

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>yum repolist all | grep mysql</code></strong>
</pre><p>
        </p><p>
          To install the latest release from the latest GA series, no
          configuration is needed. To install the latest release from a
          specific series other than the latest GA series, disable the
          subrepository for the latest GA series and enable the
          subrepository for the specific series before running the
          installation command. If your platform supports
          <span class="command"><strong>yum-config-manager</strong></span>, you can do that by
          issuing these commands, which disable the subrepository for
          the 5.7 series and enable the one for the
          8.0 series:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum-config-manager --disable mysql57-community</code></strong>
shell&gt; <strong class="userinput"><code>sudo yum-config-manager --enable mysql80-community</code></strong>
</pre><p>

          For dnf-enabled platforms:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo dnf config-manager --disable mysql57-community</code></strong>
shell&gt; <strong class="userinput"><code>sudo dnf config-manager --enable mysql80-community</code></strong>
</pre><p>
        </p><p>
          Besides using <span class="command"><strong>yum-config-manager</strong></span> or the
          <span class="command"><strong>dnf config-manager</strong></span> command, you can also
          select a release series by editing manually the
          <code class="filename">/etc/yum.repos.d/mysql-community.repo</code>
          file. This is a typical entry for a release series'
          subrepository in the file:

</p><pre data-lang="ini" class="programlisting">[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql</pre><p>

          Find the entry for the subrepository you want to configure,
          and edit the <code class="option">enabled</code> option. Specify
          <code class="option">enabled=0</code> to disable a subrepository, or
          <code class="option">enabled=1</code> to enable a subrepository. For
          example, to install MySQL 8.0, make sure you have
          <code class="option">enabled=0</code> for the above subrepository entry
          for MySQL 5.7, and have
          <code class="option">enabled=1</code> for the entry for the
          8.0 series:
        </p><pre data-lang="ini" class="programlisting"># Enable to use MySQL 8.0
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql</pre><p>
          You should only enable subrepository for one release series at
          any time. When subrepositories for more than one release
          series are enabled, the latest series will be used by Yum.
        </p><p>
          Verify that the correct subrepositories have been enabled and
          disabled by running the following command and checking its
          output (for dnf-enabled systems, replace
          <span class="command"><strong>yum</strong></span> in the command with
          <span class="command"><strong>dnf</strong></span>):
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>yum repolist enabled | grep mysql</code></strong>
</pre></li><li class="listitem">
<h4><a name="yum-repo-disabling-mysql"></a>Disabling the Default MySQL Module</h4>
<p>
          (EL8 systems only) EL8-based systems such as RHEL8 and Oracle
          Linux 8 include a MySQL module that is enabled by default.
          Unless this module is disabled, it masks packages provided by
          MySQL repositories. To disable the included module and make
          the MySQL repository packages visible, use the following
          command (for dnf-enabled systems, replace
          <span class="command"><strong>yum</strong></span> in the command with
          <span class="command"><strong>dnf</strong></span>):
        </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum module disable mysql</code></strong>
</pre></li><li class="listitem">
<h4><a name="yum-repo-installing-mysql"></a>Installing MySQL</h4>
<p>
          Install MySQL by the following command (for dnf-enabled
          systems, replace <span class="command"><strong>yum</strong></span> in the command with
          <span class="command"><strong>dnf</strong></span>):
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum install mysql-community-server</code></strong>
</pre><p>
          This installs the package for MySQL server
          (<code class="filename">mysql-community-server</code>) and also
          packages for the components required to run the server,
          including packages for the client
          (<code class="filename">mysql-community-client</code>), the common
          error messages and character sets for client and server
          (<code class="filename">mysql-community-common</code>), and the shared
          client libraries (<code class="filename">mysql-community-libs</code>).
</p></li><li class="listitem">
<h4><a name="yum-repo-starting-and-stopping-server"></a>Starting the MySQL Server</h4>
<p>
          Start the MySQL server with the following command:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo service mysqld start</code></strong>
Starting mysqld:[ OK ]
</pre><p>
          You can check the status of the MySQL server with the
          following command:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo service mysqld status</code></strong>
mysqld (pid 3066) is running.
</pre></li></ol>
</div>
<p>
      At the initial start up of the server, the following happens,
      given that the data directory of the server is empty:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The server is initialized.
        </p></li><li class="listitem"><p>
          SSL certificate and key files are generated in the data
          directory.
        </p></li><li class="listitem"><p>
          <a class="link" href="security.html#validate-password" title="6.4.3 The Password Validation Component"><code class="literal">validate_password</code></a>
          is installed and enabled.
        </p></li><li class="listitem"><p>
          A superuser account <code class="literal">'root'@'localhost</code> is
          created. A password for the superuser is set and stored in the
          error log file. To reveal it, use the following command:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo grep 'temporary password' /var/log/mysqld.log</code></strong>
</pre><p>
          Change the root password as soon as possible by logging in
          with the generated, temporary password and set a custom
          password for the superuser account:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysql -uroot -p </code></strong>
</pre><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            <a class="link" href="security.html#validate-password" title="6.4.3 The Password Validation Component"><code class="literal">validate_password</code></a>
            is installed by default. The default password policy
            implemented by <code class="literal">validate_password</code> requires
            that passwords contain at least one uppercase letter, one
            lowercase letter, one digit, and one special character, and
            that the total password length is at least 8 characters.
</p>
</div>
</li></ul>
</div>
<p>
      For more information on the postinstallation procedures, see
      <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p><a name="yum-install-compatibility-el7"></a>
        <span class="emphasis"><em>Compatibility Information for EL7-based
        platforms:</em></span> The following RPM packages from the native
        software repositories of the platforms are incompatible with the
        package from the MySQL Yum repository that installs the MySQL
        server. Once you have installed MySQL using the MySQL Yum
        repository, you will not be able to install these packages (and
        vice versa).
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            akonadi-mysql
</p></li></ul>
</div>

</div>
<h4><a name="yum-install-components"></a>Installing Additional MySQL Products and Components with Yum</h4>
<p>
      You can use Yum to install and manage individual components of
      MySQL. Some of these components are hosted in sub-repositories of
      the MySQL Yum repository: for example, the MySQL Connectors are to
      be found in the MySQL Connectors Community sub-repository, and the
      MySQL Workbench in MySQL Tools Community. You can use the
      following command to list the packages for all the MySQL
      components available for your platform from the MySQL Yum
      repository (for dnf-enabled systems, replace
      <span class="command"><strong>yum</strong></span> in the command with
      <span class="command"><strong>dnf</strong></span>):
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum --disablerepo=\* --enablerepo='mysql*-community*' list available</code></strong>
</pre><p>
      Install any packages of your choice with the following command,
      replacing <em class="replaceable"><code>package-name</code></em> with name of the
      package (for dnf-enabled systems, replace <span class="command"><strong>yum</strong></span>
      in the command with <span class="command"><strong>dnf</strong></span>):
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum install <em class="replaceable"><code>package-name</code></em></code></strong>
</pre><p>
      For example, to install MySQL Workbench on Fedora:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo dnf install mysql-workbench-community</code></strong>
</pre><p>
      To install the shared client libraries (for dnf-enabled systems,
      replace <span class="command"><strong>yum</strong></span> in the command with
      <span class="command"><strong>dnf</strong></span>):
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum install mysql-community-libs</code></strong>
</pre>
<h4><a name="yum-install-platform-specifics"></a>Platform Specific Notes</h4>
<p>
      ARM Support
    </p><p>
      ARM 64-bit (aarch64) is supported on Oracle Linux 7 and requires
      the Oracle Linux 7 Software Collections Repository
      (ol7_software_collections). For example, to install the server:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; yum-config-manager --enable ol7_software_collections
shell&gt; yum install mysql-community-server</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        ARM 64-bit (aarch64) is supported on Oracle Linux 7 as of MySQL
        8.0.12.
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Known Limitation
</div>
<p>
        The 8.0.12 release requires you to adjust the
        <span class="emphasis"><em>libstdc++7</em></span> path by executing <code class="literal">ln -s
        /opt/oracle/oracle-armtoolset-1/root/usr/lib64
        /usr/lib64/gcc7</code> after executing the <code class="literal">yum
        install</code> step.
</p>
</div>
<h4><a name="idm46444441743824"></a>Updating MySQL with Yum</h4>
<p>
      Besides installation, you can also perform updates for MySQL
      products and components using the MySQL Yum repository. See
      <a class="xref" href="installing.html#updating-yum-repo" title="2.11.7 Upgrading MySQL with the MySQL Yum Repository">Section 2.11.7, “Upgrading MySQL with the MySQL Yum Repository”</a> for details.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-apt-repo"></a>2.5.2 Installing MySQL on Linux Using the MySQL APT Repository</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444441740608"></a><a class="indexterm" name="idm46444441739120"></a><p>
      The MySQL APT repository provides <code class="filename">deb</code>
      packages for installing and managing the MySQL server, client, and
      other components on the current Debian and Ubuntu releases.
    </p><p>
      Instructions for using the MySQL APT Repository are available in
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/" target="_top">A Quick
      Guide to Using the MySQL APT Repository</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-sles-repo"></a>2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444441733680"></a><a class="indexterm" name="idm46444441732192"></a><p>
      The MySQL SLES repository provides RPM packages for installing and
      managing the MySQL server, client, and other components on SUSE
      Enterprise Linux Server.
    </p><p>
      Instructions for using the MySQL SLES repository are available in
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-sles-repo-quick-guide/en/" target="_top">A
      Quick Guide to Using the MySQL SLES Repository</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-rpm"></a>2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444441728016"></a><a class="indexterm" name="idm46444441726976"></a><a class="indexterm" name="idm46444441725904"></a><p>
      The recommended way to install MySQL on RPM-based Linux
      distributions is by using the RPM packages provided by Oracle.
      There are two sources for obtaining them, for the Community
      Edition of MySQL:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          From the MySQL software repositories:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              The MySQL Yum repository (see
              <a class="xref" href="installing.html#linux-installation-yum-repo" title="2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository">Section 2.5.1, “Installing MySQL on Linux Using the MySQL Yum Repository”</a> for
              details).
            </p></li><li class="listitem"><p>
              The MySQL SLES repository (see
              <a class="xref" href="installing.html#linux-installation-sles-repo" title="2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository">Section 2.5.3, “Installing MySQL on Linux Using the MySQL SLES Repository”</a> for
              details).
</p></li></ul>
</div>
</li><li class="listitem"><p>
          From the <a class="ulink" href="https://dev.mysql.com/downloads/mysql/" target="_top"> Download
          MySQL Community Server</a> page in the
          <a class="ulink" href="https://dev.mysql.com/" target="_top">MySQL Developer Zone</a>.
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
        RPM distributions of MySQL are also provided by other vendors.
        Be aware that they may differ from those built by Oracle in
        features, capabilities, and conventions (including communication
        setup), and that the installation instructions in this manual do
        not necessarily apply to them. The vendor's instructions should
        be consulted instead.
</p>
</div>
<h4><a name="idm46444441714768"></a>MySQL RPM Packages</h4>

<div class="table">
<a name="idm46444441714080"></a><p class="title"><b>Table 2.8 RPM Packages for MySQL Community Edition</b></p>
<div class="table-contents">
<table frame="all"><col width="35%"><col width="25%"><thead><tr>
          <th scope="col">Package Name</th>
          <th scope="col">Summary</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="literal">mysql-community-client</code></td>
          <td>MySQL client applications and tools</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-common</code></td>
          <td>Common files for server and client libraries</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-devel</code></td>
          <td>Development header files and libraries for MySQL database client
            applications</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-embedded-compat</code></td>
          <td>MySQL server as an embedded library with compatibility for applications
            using version 18 of the library</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-libs</code></td>
          <td>Shared libraries for MySQL database client applications</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-libs-compat</code></td>
          <td>Shared compatibility libraries for previous MySQL installations</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-server</code></td>
          <td>Database server and related tools</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-server-debug</code></td>
          <td>Debug server and plugin binaries</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community-test</code></td>
          <td>Test suite for the MySQL server</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-community</code></td>
          <td>The source code RPM looks similar to
            mysql-community-8.0.22-1.el7.src.rpm, depending
            on selected OS</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
<div class="table">
<a name="idm46444441679344"></a><p class="title"><b>Table 2.9 RPM Packages for the MySQL Enterprise Edition</b></p>
<div class="table-contents">
<table frame="all"><col width="35%"><col width="25%"><thead><tr>
          <th scope="col">Package Name</th>
          <th scope="col">Summary</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="literal">mysql-commercial-backup</code></td>
          <td>MySQL Enterprise Backup (added in 8.0.11)</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-client</code></td>
          <td>MySQL client applications and tools</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-common</code></td>
          <td>Common files for server and client libraries</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-devel</code></td>
          <td>Development header files and libraries for MySQL database client
            applications</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-embedded-compat</code></td>
          <td>MySQL server as an embedded library with compatibility for applications
            using version 18 of the library</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-libs</code></td>
          <td>Shared libraries for MySQL database client applications</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-libs-compat</code></td>
          <td>Shared compatibility libraries for previous MySQL installations; the
            version of the libraries matches the version of the
            libraries installed by default by the distribution you are
            using</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-server</code></td>
          <td>Database server and related tools</td>
        </tr><tr>
          <td scope="row"><code class="literal">mysql-commercial-test</code></td>
          <td>Test suite for the MySQL server</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
      The full names for the RPMs have the following syntax:
    </p><pre data-lang="terminal" class="programlisting"><em class="replaceable"><code>packagename</code></em>-<em class="replaceable"><code>version</code></em>-<em class="replaceable"><code>distribution</code></em>-<em class="replaceable"><code>arch</code></em>.rpm
</pre><p>
      The <em class="replaceable"><code>distribution</code></em> and
      <em class="replaceable"><code>arch</code></em> values indicate the Linux
      distribution and the processor type for which the package was
      built. See the table below for lists of the distribution
      identifiers:
</p>
<div class="table">
<a name="idm46444441643040"></a><p class="title"><b>Table 2.10 MySQL Linux RPM Package Distribution Identifiers</b></p>
<div class="table-contents">
<table><col width="25%"><col width="75%"><thead><tr>
          <th scope="col">Distribution Value</th>
          <th scope="col">Intended Use</th>
        </tr></thead><tbody><tr>
          <td scope="row">el<em class="replaceable"><code>{version}</code></em> where
            <em class="replaceable"><code>{version}</code></em> is the major Enterprise
            Linux version, such as <code class="literal">el8</code></td>
          <td>EL6, EL7, and EL8-based platforms (for example, the corresponding versions of Oracle Linux, Red Hat Enterprise Linux, and CentOS)</td>
        </tr><tr>
          <td scope="row">fc<em class="replaceable"><code>{version}</code></em> where
            <em class="replaceable"><code>{version}</code></em> is the major Fedora
            version, such as <code class="literal">fc31</code></td>
          <td>Fedora 30 and 31</td>
        </tr><tr>
          <td scope="row"><code class="literal">sles12</code></td>
          <td>SUSE Linux Enterprise Server 12</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
      To see all files in an RPM package (for example,
      <code class="literal">mysql-community-server</code>), use the following
      command:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpm -qpl mysql-community-server-<em class="replaceable"><code>version</code></em>-<em class="replaceable"><code>distribution</code></em>-<em class="replaceable"><code>arch</code></em>.rpm</code></strong>
</pre><p>
      <span class="emphasis"><em>The discussion in the rest of this section applies only
      to an installation process using the RPM packages directly
      downloaded from Oracle, instead of through a MySQL
      repository.</em></span>
    </p><p>
      Dependency relationships exist among some of the packages. If you
      plan to install many of the packages, you may wish to download the
      RPM bundle <span class="command"><strong>tar</strong></span> file instead, which contains all
      the RPM packages listed above, so that you need not download them
      separately.
    </p><p>
      In most cases, you need to install the
      <code class="literal">mysql-community-server</code>,
      <code class="literal">mysql-community-client</code>,
      <code class="literal">mysql-community-libs</code>,
      <code class="literal">mysql-community-common</code>, and
      <code class="literal">mysql-community-libs-compat</code> packages to get a
      functional, standard MySQL installation. To perform such a
      standard, basic installation, go to the folder that contains all
      those packages (and, preferably, no other RPM packages with
      similar names), and issue the following command:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum install mysql-community-{server,client,common,libs}-*</code></strong>
</pre><p>
      Replace <span class="command"><strong>yum</strong></span> with <span class="command"><strong>zypper</strong></span> for
      SLES, and with <span class="command"><strong>dnf</strong></span> for Fedora.
    </p><p>
      While it is much preferable to use a high-level package management
      tool like <span class="command"><strong>yum</strong></span> to install the packages, users
      who prefer direct <span class="command"><strong>rpm</strong></span> commands can replace the
      <span class="command"><strong>yum install</strong></span> command with the <span class="command"><strong>rpm
      -Uvh</strong></span> command; however, using <span class="command"><strong>rpm -Uvh</strong></span>
      instead makes the installation process more prone to failure, due
      to potential dependency issues the installation process might run
      into.
    </p><p>
      To install only the client programs, you can skip
      <code class="literal">mysql-community-server</code> in your list of packages
      to install; issue the following command:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo yum install mysql-community-{client,common,libs}-* </code></strong>
</pre><p>
      Replace <span class="command"><strong>yum</strong></span> with <span class="command"><strong>zypper</strong></span> for
      SLES, and with <span class="command"><strong>dnf</strong></span> for Fedora.
    </p><p>
      A standard installation of MySQL using the RPM packages result in
      files and resources created under the system directories, shown in
      the following table.
</p>
<div class="table">
<a name="mysql-installation-layout-linuxrpm"></a><p class="title"><b>Table 2.11 MySQL Installation Layout for Linux RPM Packages from the MySQL
Developer Zone</b></p>
<div class="table-contents">
<table><col width="55%"><col width="45%"><thead><tr>
          <th scope="col">Files or Resources</th>
          <th scope="col">Location</th>
        </tr></thead><tbody><tr>
          <td scope="row">Client programs and scripts</td>
          <td><code class="filename">/usr/bin</code></td>
        </tr><tr>
          <td scope="row"><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server</td>
          <td><code class="filename">/usr/sbin</code></td>
        </tr><tr>
          <td scope="row">Configuration file</td>
          <td><code class="filename">/etc/my.cnf</code></td>
        </tr><tr>
          <td scope="row">Data directory</td>
          <td><code class="filename">/var/lib/mysql</code></td>
        </tr><tr>
          <td scope="row">Error log file</td>
          <td><p>
              For RHEL, Oracle Linux, CentOS or Fedora platforms:
              <code class="filename">/var/log/mysqld.log</code>
            </p><p>
              For SLES: <code class="filename">/var/log/mysql/mysqld.log</code>
            </p></td>
        </tr><tr>
          <td scope="row">Value of <a class="link" href="server-administration.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a></td>
          <td><code class="filename">/var/lib/mysql-files</code></td>
        </tr><tr>
          <td scope="row">System V init script</td>
          <td><p>
              For RHEL, Oracle Linux, CentOS or Fedora platforms:
              <code class="filename">/etc/init.d/mysqld</code>
            </p><p>
              For SLES: <code class="filename">/etc/init.d/mysql</code>
            </p></td>
        </tr><tr>
          <td scope="row">Systemd service</td>
          <td><p>
              For RHEL, Oracle Linux, CentOS or Fedora platforms:
              <code class="filename">mysqld</code>
            </p><p>
              For SLES: <code class="filename">mysql</code>
            </p></td>
        </tr><tr>
          <td scope="row">Pid file</td>
          <td><code class="filename"> /var/run/mysql/mysqld.pid</code></td>
        </tr><tr>
          <td scope="row">Socket</td>
          <td><code class="filename">/var/lib/mysql/mysql.sock</code></td>
        </tr><tr>
          <td scope="row">Keyring directory</td>
          <td><code class="filename">/var/lib/mysql-keyring</code></td>
        </tr><tr>
          <td scope="row">Unix manual pages</td>
          <td><code class="filename">/usr/share/man</code></td>
        </tr><tr>
          <td scope="row">Include (header) files</td>
          <td><code class="filename">/usr/include/mysql</code></td>
        </tr><tr>
          <td scope="row">Libraries</td>
          <td><code class="filename">/usr/lib/mysql</code></td>
        </tr><tr>
          <td scope="row">Miscellaneous support files (for example, error messages, and character
            set files)</td>
          <td><code class="filename">/usr/share/mysql</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
      The installation also creates a user named
      <code class="literal">mysql</code> and a group named
      <code class="literal">mysql</code> on the system.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Installation of previous versions of MySQL using older packages
        might have created a configuration file named
        <code class="filename">/usr/my.cnf</code>. It is highly recommended that
        you examine the contents of the file and migrate the desired
        settings inside to the file <code class="filename">/etc/my.cnf</code>
        file, then remove <code class="filename">/usr/my.cnf</code>.
</p>
</div>
<p>
      MySQL is NOT automatically started at the end of the installation
      process. For Red Hat Enterprise Linux, Oracle Linux, CentOS, and
      Fedora systems, use the following command to start MySQL:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>systemctl start mysqld</code></strong>
</pre><p>
      For SLES systems, the command is the same, but the service name is
      different:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>systemctl start mysql</code></strong>
</pre><p>
      If the operating system is systemd enabled, standard
      <span class="command"><strong>systemctl</strong></span> (or alternatively,
      <span class="command"><strong>service</strong></span> with the arguments reversed) commands
      such as <span class="command"><strong>stop</strong></span>, <span class="command"><strong>start</strong></span>,
      <span class="command"><strong>status</strong></span>, and <a class="link" href="sql-statements.html#restart" title="13.7.8.8 RESTART Statement"><span class="command"><strong>restart</strong></span></a> should
      be used to manage the MySQL server service. The
      <code class="literal">mysqld</code> service is enabled by default, and it
      starts at system reboot. Notice that certain things might work
      differently on systemd platforms: for example, changing the
      location of the data directory might cause issues. See
      <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a> for additional information.
    </p><p>
      During an upgrade installation using RPM packages, if the MySQL
      server is running when the upgrade occurs then the MySQL server is
      stopped, the upgrade occurs, and the MySQL server is restarted.
      One exception: if the edition also changes during an upgrade (such
      as community to commercial, or vice-versa), then MySQL server is
      not restarted.
    </p><p>
      At the initial start up of the server, the following happens,
      given that the data directory of the server is empty:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The server is initialized.
        </p></li><li class="listitem"><p>
          An SSL certificate and key files are generated in the data
          directory.
        </p></li><li class="listitem"><p>
          <a class="link" href="security.html#validate-password" title="6.4.3 The Password Validation Component"><code class="literal">validate_password</code></a>
          is installed and enabled.
        </p></li><li class="listitem"><p>
          A superuser account <code class="literal">'root'@'localhost'</code> is
          created. A password for the superuser is set and stored in the
          error log file. To reveal it, use the following command for
          RHEL, Oracle Linux, CentOS, and Fedora systems:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo grep 'temporary password' /var/log/mysqld.log</code></strong>
</pre><p>
          Use the following command for SLES systems:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo grep 'temporary password' /var/log/mysql/mysqld.log</code></strong>
</pre><p>
          The next step is to log in with the generated, temporary
          password and set a custom password for the superuser account:
</p></li></ul>
</div>
<pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysql -uroot -p </code></strong>
</pre><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        <a class="link" href="security.html#validate-password" title="6.4.3 The Password Validation Component"><code class="literal">validate_password</code></a>
        is installed by default. The default password policy implemented
        by <code class="literal">validate_password</code> requires that passwords
        contain at least one uppercase letter, one lowercase letter, one
        digit, and one special character, and that the total password
        length is at least 8 characters.
</p>
</div>
<p>
      If something goes wrong during installation, you might find debug
      information in the error log file
      <code class="filename">/var/log/mysqld.log</code>.
    </p><p>
      For some Linux distributions, it might be necessary to increase
      the limit on number of file descriptors available to
      <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>. See
      <a class="xref" href="error-handling.html#not-enough-file-handles" title="B.4.2.17 File Not Found and Similar Errors">Section B.4.2.17, “File Not Found and Similar Errors”</a>
    </p><p><b>Installing Client Libraries from Multiple MySQL Versions. </b>
        It is possible to install multiple client library versions, such
        as for the case that you want to maintain compatibility with
        older applications linked against previous libraries. To install
        an older client library, use the <code class="option">--oldpackage</code>
        option with <span class="command"><strong>rpm</strong></span>. For example, to install
        <code class="literal">mysql-community-libs-5.5</code> on an EL6 system
        that has <code class="literal">libmysqlclient.21</code> from MySQL 8.0,
        use a command like this:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpm --oldpackage -ivh mysql-community-libs-5.5.50-2.el6.x86_64.rpm</code></strong>
</pre><p><b>Debug Package. </b>
        A special variant of MySQL Server compiled with the
        <a class="link" href="extending-mysql.html#dbug-package" title="29.5.4 The DBUG Package">debug package</a> has been
        included in the server RPM packages. It performs debugging and
        memory allocation checks and produces a trace file when the
        server is running. To use that debug version, start MySQL with
        <code class="filename">/usr/sbin/mysqld-debug</code>, instead of starting
        it as a service or with <code class="filename">/usr/sbin/mysqld</code>.
        See <a class="xref" href="extending-mysql.html#dbug-package" title="29.5.4 The DBUG Package">Section 29.5.4, “The DBUG Package”</a> for the debug options you can
        use.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        The default plugin directory for debug builds changed from
        <code class="filename">/usr/lib64/mysql/plugin</code> to
        <code class="filename">/usr/lib64/mysql/plugin/debug</code> in MySQL
        8.0.4. Previously, it was necessary to change
        <a class="link" href="server-administration.html#sysvar_plugin_dir"><code class="literal">plugin_dir</code></a> to
        <code class="filename">/usr/lib64/mysql/plugin/debug</code> for debug
        builds.
</p>
</div>
<p><b>Rebuilding RPMs from source SRPMs. </b>
        Source code SRPM packages for MySQL are available for download.
        They can be used as-is to rebuild the MySQL RPMs with the
        standard <span class="command"><strong>rpmbuild</strong></span> tool chain.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-debian"></a>2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle</h3>

</div>

</div>

</div>
<p>
      Oracle provides Debian packages for installing MySQL on Debian or
      Debian-like Linux systems. The packages are available through two
      different channels:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="ulink" href="https://dev.mysql.com/downloads/repo/apt/" target="_top">MySQL APT
          Repository</a>. This is the preferred method for
          installing MySQL on Debian-like systems, as it provides a
          simple and convenient way to install and update MySQL
          products. For details, see
          <a class="xref" href="installing.html#linux-installation-apt-repo" title="2.5.2 Installing MySQL on Linux Using the MySQL APT Repository">Section 2.5.2, “Installing MySQL on Linux Using the MySQL APT Repository”</a>.
        </p></li><li class="listitem"><p>
          The <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">MySQL Developer Zone's
          Download Area</a>. For details, see
          <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>. The following are some
          information on the Debian packages available there and the
          instructions for installing them:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Various Debian packages are provided in the MySQL
              Developer Zone for installing different components of
              MySQL on the current Debian and Ubuntu platforms. The
              preferred method is to use the tarball bundle, which
              contains the packages needed for a basic setup of MySQL.
              The tarball bundles have names in the format of
              <code class="filename">mysql-server_<em class="replaceable"><code>MVER</code></em>-<em class="replaceable"><code>DVER</code></em>_<em class="replaceable"><code>CPU</code></em>.deb-bundle.tar</code>.
              <em class="replaceable"><code>MVER</code></em> is the MySQL version and
              <em class="replaceable"><code>DVER</code></em> is the Linux distribution
              version. The <em class="replaceable"><code>CPU</code></em> value
              indicates the processor type or family for which the
              package is built, as shown in the following table:
</p>
<div class="table">
<a name="idm46444441478336"></a><p class="title"><b>Table 2.12 MySQL Debian and Ubuntu Installation Packages CPU Identifiers</b></p>
<div class="table-contents">
<table><col width="25%"><col width="75%"><thead><tr>
                  <th scope="col"><em class="replaceable"><code>CPU</code></em> Value</th>
                  <th scope="col">Intended Processor Type or Family</th>
                </tr></thead><tbody><tr>
                  <td scope="row"><code class="literal">i386</code></td>
                  <td>Pentium processor or better, 32 bit</td>
                </tr><tr>
                  <td scope="row"><code class="literal">amd64</code></td>
                  <td>64-bit x86 processor</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"></li><li class="listitem"><p>
              After downloading the tarball, unpack it with the
              following command:
            </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>tar -xvf mysql-server_<em class="replaceable"><code>MVER</code></em>-<em class="replaceable"><code>DVER</code></em>_<em class="replaceable"><code>CPU</code></em>.deb-bundle.tar</code></strong>
</pre></li><li class="listitem"><p>
              <a class="indexterm" name="idm46444441462240"></a>

              You may need to install the <code class="literal">libaio</code>
              library if it is not already present on your system:
            </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo apt-get install libaio1</code></strong>
</pre></li><li class="listitem"><p>
              Preconfigure the MySQL server package with the following
              command:
            </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo dpkg-preconfigure mysql-community-server_*.deb</code></strong>
</pre><p>
              You will be asked to provide a password for the root user
              for your MySQL installation. You might also be asked other
              questions regarding the installation.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p><a name="linux-installing-debian-password"></a>
                Make sure you remember the root password you set. Users
                who want to set a password later can leave the
                <span class="guilabel">password</span> field blank in the
                dialogue box and just press <span class="guibutton">OK</span>;
                in that case, root access to the server is authenticated
                using the
                <a class="link" href="security.html#socket-pluggable-authentication" title="6.4.1.9 Socket Peer-Credential Pluggable Authentication">MySQL
                Socket Peer-Credential Authentication Plugin</a> for
                connections using a Unix socket file. You can set the
                root password later using
                <a class="link" href="programs.html#mysql-secure-installation" title="4.4.2 mysql_secure_installation — Improve MySQL Installation Security"><span class="command"><strong>mysql_secure_installation</strong></span></a>.
</p>
</div>
</li><li class="listitem"><p>
              For a basic installation of the MySQL server, install the
              database common files package, the client package, the
              client metapackage, the server package, and the server
              metapackage (in that order); you can do that with a single
              command:
            </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb</code></strong>
</pre><p>
              There are also packages with
              <code class="literal">server-core</code> and
              <code class="literal">client-core</code> in the package names. These
              contain binaries only and are installed automatically by
              the standard packages. Installing them by themselves will
              not result in a functioning MySQL setup.
            </p><p>
              If you are being warned of unmet dependencies by
              <span class="command"><strong>dpkg</strong></span>, you can fix them using
              <span class="command"><strong>apt-get</strong></span>:
            </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>sudo apt-get -f install</code></strong></pre><p>
              Here are where the files are installed on the system:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; "><li class="listitem"><p>
                  All configuration files (like
                  <code class="filename">my.cnf</code>) are under
                  <code class="filename">/etc/mysql</code>
                </p></li><li class="listitem"><p>
                  All binaries, libraries, headers, etc., are under
                  <code class="filename">/usr/bin</code> and
                  <code class="filename">/usr/sbin</code>
                </p></li><li class="listitem"><p>
                  The data directory is under
                  <code class="filename">/var/lib/mysql</code>
</p></li></ul>
</div>
</li></ul>
</div>
</li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
        Debian distributions of MySQL are also provided by other
        vendors. Be aware that they may differ from those built by
        Oracle in features, capabilities, and conventions (including
        communication setup), and that the instructions in this manual
        do not necessarily apply to installing them. The vendor's
        instructions should be consulted instead.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-docker"></a>2.5.6 Deploying MySQL on Linux with Docker</h3>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#docker-mysql-getting-started">2.5.6.1 Basic Steps for MySQL Server Deployment with Docker</a></span></dt><dt><span class="section"><a href="installing.html#docker-mysql-more-topics">2.5.6.2 More Topics on Deploying MySQL Server with Docker</a></span></dt><dt><span class="section"><a href="installing.html#deploy-mysql-nonlinux-docker">2.5.6.3 Deploying MySQL on Windows and Other Non-Linux Platforms with Docker</a></span></dt></dl>
</div>
<p>
      The Docker deployment framework supports easy installation and
      configuration of MySQL Server. This section explains how to use a
      MySQL Server Docker image.
    </p><p>
      You need to have Docker installed on your system before you can
      use a MySQL Server Docker image. See
      <a class="ulink" href="https://docs.docker.com/engine/installation/" target="_top">Install
      Docker</a> for instructions.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
        You need to either run <code class="literal">docker</code> commands with
        <code class="literal">sudo</code>, or create a <code class="literal">docker</code>
        usergroup, and then add to it any users who want to run
        <code class="literal">docker</code> commands. See details
        <a class="ulink" href="https://docs.docker.com/engine/installation/linux/linux-postinstall/" target="_top">here</a>.
        Because Docker containers are always run with root privileges,
        you should understand the
        <a class="ulink" href="https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface" target="_top">Docker
        daemon attack surface</a> and properly mitigate the related
        risks.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="docker-mysql-getting-started"></a>2.5.6.1 Basic Steps for MySQL Server Deployment with Docker</h4>

</div>

</div>

</div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
          The MySQL Docker images maintained by the MySQL team are built
          specifically for Linux platforms. Other platforms are not
          supported, and users using these MySQL Docker images on them
          are doing so at their own risk. See
          <a class="link" href="installing.html#deploy-mysql-nonlinux-docker" title="2.5.6.3 Deploying MySQL on Windows and Other Non-Linux Platforms with Docker">the discussion
          here</a> for some known limitations for running these
          containers on non-Linux operating systems.
</p>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#docker-download-image" title="Downloading a MySQL Server Docker Image">Downloading a MySQL Server Docker Image</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-starting-mysql-server" title="Starting a MySQL Server Instance">Starting a MySQL Server Instance</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-connecting-within-container" title="Connecting to MySQL Server from within the Container">Connecting to MySQL Server from within the Container</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-shell-access" title="Container Shell Access">Container Shell Access</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-stopping-deleting" title="Stopping and Deleting a MySQL Container">Stopping and Deleting a MySQL Container</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-upgrading" title="Upgrading a MySQL Server Container">Upgrading a MySQL Server Container</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-more-topics" title="More Topics on Deploying MySQL Server with Docker">More Topics on Deploying MySQL Server with Docker</a></p></li></ul>
</div>
<h5><a name="docker-download-image"></a>Downloading a MySQL Server Docker Image</h5>
<p>
        Downloading the server image in a separate step is not strictly
        necessary; however, performing this step before you create your
        Docker container ensures your local image is up to date. To
        download the MySQL Community Edition image, run this command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker pull mysql/mysql-server:<em class="replaceable"><code>tag</code></em></code></strong></pre><p>
        The <em class="replaceable"><code>tag</code></em> is the label for the image
        version you want to pull (for example, <code class="literal">5.5</code>,
        <code class="literal">5.6</code>, <code class="literal">5.7</code>,
        <code class="literal">8.0</code>, or <code class="literal">latest</code>). If
        <strong class="userinput"><code>:<em class="replaceable"><code>tag</code></em></code></strong> is
        omitted, the <code class="literal">latest</code> label is used, and the
        image for the latest GA version of MySQL Community Server is
        downloaded. Refer to the list of tags for available versions on
        the
        <a class="ulink" href="https://hub.docker.com/r/mysql/mysql-server/tags/" target="_top">mysql/mysql-server
        page in the Docker Hub</a>.
      </p><p>
        You can list downloaded Docker images with this command:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker images</code></strong>
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
mysql/mysql-server   latest              3157d7f55f8d        4 weeks ago         241MB
</pre><p>
        To download the MySQL Enterprise Edition image from the
        <a class="ulink" href="https://support.oracle.com/" target="_top">My Oracle
        Support</a> website, sign in to your Oracle account,
        download from <span class="guimenu">Patches and Updates</span> the
        <code class="filename">tar.zip</code> file for the Docker image
        (<code class="filename">mysql-commercial-<em class="replaceable"><code>version</code></em>_linux_x86_64_docker_tar.zip</code>),
        unzip it to obtain the tarball inside
        (<code class="filename">mysql-enterprise-server-<em class="replaceable"><code>version</code></em>.tar</code>),
        and then load the image by running this command:
</p><pre class="programlisting"><strong class="userinput"><code>docker load -i mysql-enterprise-server-<em class="replaceable"><code>version</code></em>.tar</code></strong></pre>
<h5><a name="docker-starting-mysql-server"></a>Starting a MySQL Server Instance</h5>
<p>
        To start a new Docker container for a MySQL Server, use the
        following command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=<em class="replaceable"><code>container_name</code></em> -d <em class="replaceable"><code>image_name</code></em>:<em class="replaceable"><code>tag</code></em></code></strong> </pre><p>
        The image name can be obtained using the <span class="command"><strong>docker
        images</strong></span> command, as explained in
        <a class="xref" href="installing.html#docker-download-image" title="Downloading a MySQL Server Docker Image">Downloading a MySQL Server Docker Image</a>. The
        <code class="option">--name</code> option, for supplying a custom name for
        your server container, is optional; if no container name is
        supplied, a random one is generated.
      </p><p>
        For example, to start a new Docker container for the MySQL
        Community Server, use this command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysql1 -d mysql/mysql-server:8.0</code></strong> </pre><p>
        To start a new Docker container for the MySQL Enterprise Server
        with a Docker image downloaded from My Oracle Support, use this
        command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysql1 -d mysql/enterprise-server:8.0</code></strong> </pre><p>
        If the Docker image of the specified name and tag has not been
        downloaded by an earlier <span class="command"><strong>docker pull</strong></span> or
        <span class="command"><strong>docker run</strong></span> command, the image is now
        downloaded. Initialization for the container begins, and the
        container appears in the list of running containers when you run
        the <span class="command"><strong>docker ps</strong></span> command. For example:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker ps</code></strong>
CONTAINER ID   IMAGE                COMMAND                  CREATED             STATUS                              PORTS                NAMES
a24888f0d6f4   mysql/mysql-server   "/entrypoint.sh my..."   14 seconds ago      Up 13 seconds (health: starting)    3306/tcp, 33060/tcp  mysql1 
</pre><p>
        The container initialization might take some time. When the
        server is ready for use, the <code class="literal">STATUS</code> of the
        container in the output of the <span class="command"><strong>docker ps</strong></span>
        command changes from <code class="literal">(health: starting)</code> to
        <code class="literal">(healthy)</code>.
      </p><p>
        The <code class="option">-d</code> option used in the <span class="command"><strong>docker
        run</strong></span> command above makes the container run in the
        background. Use this command to monitor the output from the
        container:

</p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker logs mysql1</code></strong></pre><p>
      </p><p>
        Once initialization is finished, the command's output is going
        to contain the random password generated for the root user;
        check the password with, for example, this command:

</p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker logs mysql1 2&gt;&amp;1 | grep GENERATED</code></strong>
GENERATED ROOT PASSWORD: Axegh3kAJyDLaRuBemecis&amp;EShOs</pre><p>
</p>
<h5><a name="docker-connecting-within-container"></a>Connecting to MySQL Server from within the Container</h5>
<p>
        Once the server is ready, you can run the
        <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client within the MySQL Server
        container you just started, and connect it to the MySQL Server.
        Use the <span class="command"><strong>docker exec -it</strong></span> command to start a
        <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client inside the Docker container you
        have started, like the following:

</p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker exec -it mysql1 mysql -uroot -p</code></strong></pre><p>

        When asked, enter the generated root password (see the last step
        in <a class="xref" href="installing.html#docker-starting-mysql-server" title="Starting a MySQL Server Instance">Starting a MySQL Server Instance</a> above on how
        to find the password). Because the
        <a class="link" href="installing.html#docker_var_mysql_onetime_password"><code class="option">MYSQL_ONETIME_PASSWORD</code></a>
        option is true by default, after you have connected a
        <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client to the server, you must reset
        the server root password by issuing this statement:

</p><pre data-lang="terminal" class="programlisting">mysql&gt; <strong class="userinput"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY '<em class="replaceable"><code>password</code></em>';</code></strong></pre><p>

        Substitute <em class="replaceable"><code>password</code></em> with the password
        of your choice. Once the password is reset, the server is ready
        for use.
</p>
<h5><a name="docker-shell-access"></a>Container Shell Access</h5>
<p>
        To have shell access to your MySQL Server container, use the
        <span class="command"><strong>docker exec -it</strong></span> command to start a bash shell
        inside the container:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker exec -it mysql1 bash</code></strong> 
bash-4.2#</pre><p>
        You can then run Linux commands inside the container. For
        example, to view contents in the server's data directory inside
        the container, use this command:
      </p><pre data-lang="terminal" class="programlisting">bash-4.2# <strong class="userinput"><code>ls /var/lib/mysql</code></strong>
auto.cnf    ca.pem	     client-key.pem  ib_logfile0  ibdata1  mysql       mysql.sock.lock	   private_key.pem  server-cert.pem  sys
ca-key.pem  client-cert.pem  ib_buffer_pool  ib_logfile1  ibtmp1   mysql.sock  performance_schema  public_key.pem   server-key.pem
</pre>
<h5><a name="docker-stopping-deleting"></a>Stopping and Deleting a MySQL Container</h5>
<p>
        To stop the MySQL Server container we have created, use this
        command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker stop mysql1</code></strong></pre><p>
        <span class="command"><strong>docker stop</strong></span> sends a SIGTERM signal to the
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> process, so that the server is shut
        down gracefully.
      </p><p>
        Also notice that when the main process of a container
        (<a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> in the case of a MySQL Server
        container) is stopped, the Docker container stops automatically.
      </p><p>
        To start the MySQL Server container again:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker start mysql1</code></strong></pre><p>
        To stop and start again the MySQL Server container with a single
        command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker restart mysql1</code></strong></pre><p>
        To delete the MySQL container, stop it first, and then use the
        <span class="command"><strong>docker rm</strong></span> command:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker stop mysql1</code></strong></pre><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker rm mysql1</code></strong> </pre><p>
        If you want the
        <a class="link" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Docker
        volume for the server's data directory</a> to be deleted at
        the same time, add the <code class="literal">-v</code> option to the
        <span class="command"><strong>docker rm</strong></span> command.
</p>
<h5><a name="docker-upgrading"></a>Upgrading a MySQL Server Container</h5>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              Before performing any upgrade to MySQL, follow carefully
              the instructions in <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a>. Among
              other instructions discussed there, it is especially
              important to back up your database before the upgrade.
            </p></li><li class="listitem"><p>
              The instructions in this section require that the server's
              data and configuration have been persisted on the host.
              See <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a>
              for details.
</p></li></ul>
</div>

</div>
<p>
        Follow these steps to upgrade a Docker installation of MySQL 5.7
        to 8.0:

        
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Stop the MySQL 5.7 server (container name is
            <code class="literal">mysql57</code> in this example):
          </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker stop mysql57</code></strong>
</pre></li><li class="listitem"><p>
            Download the MySQL 8.0 Server Docker image. See instructions
            in <a class="xref" href="installing.html#docker-download-image" title="Downloading a MySQL Server Docker Image">Downloading a MySQL Server Docker Image</a>; make sure you
            use the right tag for MySQL 8.0.
          </p></li><li class="listitem"><p>
            Start a new MySQL 8.0 Docker container (named
            <code class="literal">mysql80</code> in this example) with the old
            server data and configuration (with proper modifications if
            needed—see <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a>) that have been
            persisted on the host (by
            <a class="ulink" href="https://docs.docker.com/engine/reference/commandline/service_create/#add-bind-mounts-or-volumes" target="_top">bind-mounting</a>
            in this example). For the MySQL Community Server, run this
            command:
          </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysql80 \
   --mount type=bind,src=/path-on-host-machine/my.cnf,dst=/etc/my.cnf \
   --mount type=bind,src=/path-on-host-machine/datadir,dst=/var/lib/mysql \        
   -d mysql/mysql-server:8.0</code></strong></pre><p>
            If needed, adjust <code class="literal">mysql/mysql-server</code> to
            the correct repository name—for example, replace it
            with


            <code class="literal">mysql/enterprise-server</code> for MySQL Enterprise Edition images
            downloaded from <a class="ulink" href="https://support.oracle.com/" target="_top">My
            Oracle Support</a>.
          </p></li><li class="listitem"><p>
            Wait for the server to finish startup. You can check the
            status of the server using the <span class="command"><strong>docker ps</strong></span>
            command (see <a class="xref" href="installing.html#docker-starting-mysql-server" title="Starting a MySQL Server Instance">Starting a MySQL Server Instance</a>
            for how to do that).
          </p></li><li class="listitem"><p>
            <span class="emphasis"><em>For MySQL 8.0.15 and earlier:</em></span> Run the
            <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables">mysql_upgrade</a> utility
            in the MySQL 8.0 Server container (not required for MySQL
            8.0.16 and later):
          </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker exec -it mysql80 mysql_upgrade -uroot -p</code></strong>
</pre><p>
            When prompted, enter the root password for your old MySQL
            5.7 Server.
          </p></li><li class="listitem"><p>
            Finish the upgrade by restarting the MySQL 8.0 Server
            container:
          </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker restart mysql80</code></strong>
</pre></li></ul>
</div>
<h5><a name="docker-more-topics"></a>More Topics on Deploying MySQL Server with Docker</h5>
<p>
        For more topics on deploying MySQL Server with Docker like
        server configuration, persisting data and configuration, server
        error log, and container environment variables, see
        <a class="xref" href="installing.html#docker-mysql-more-topics" title="2.5.6.2 More Topics on Deploying MySQL Server with Docker">Section 2.5.6.2, “More Topics on Deploying MySQL Server with Docker”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="docker-mysql-more-topics"></a>2.5.6.2 More Topics on Deploying MySQL Server with Docker</h4>

</div>

</div>

</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          Most of the sample commands below have
          <code class="literal">mysql/mysql-server</code> as the Docker image
          repository when that has to be specified (like with the
          <span class="command"><strong>docker pull</strong></span> and <span class="command"><strong>docker
          run</strong></span> commands); change that if your image is from
          another repository—for example, replace it with


          <code class="literal">mysql/enterprise-server</code> for MySQL Enterprise Edition images
          downloaded from <a class="ulink" href="https://support.oracle.com/" target="_top">My
          Oracle Support</a>.
</p>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#docker-optimized-installation" title="The Optimized MySQL Installation for Docker">The Optimized MySQL Installation for Docker</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-configuring-server" title="Configuring the MySQL Server">Configuring the MySQL Server</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-additional-init" title="Running Additional Initialization Scripts">Running Additional Initialization Scripts</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-app-in-another-container" title="Connect to MySQL from an Application in Another Docker Container">Connect to MySQL from an Application in Another Docker Container</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-server-error-log" title="Server Error Log">Server Error Log</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-meb" title="Using MySQL Enterprise Backup with Docker">Using MySQL Enterprise Backup with Docker</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#docker-environment-variables" title="Docker Environment Variables">Docker Environment Variables</a></p></li></ul>
</div>
<h5><a name="docker-optimized-installation"></a>The Optimized MySQL Installation for Docker</h5>
<p>
        Docker images for MySQL are optimized for code size, which means
        they only include crucial components that are expected to be
        relevant for the majority of users who run MySQL instances in
        Docker containers. A MySQL Docker installation is different from
        a common, non-Docker installation in the following aspects:

</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              Included binaries are limited to:

</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                    <code class="filename"> /usr/bin/my_print_defaults</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysql</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysql_config</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysql_install_db</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysql_tzinfo_to_sql</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysql_upgrade</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename"> /usr/bin/mysqladmin</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename"> /usr/bin/mysqlcheck</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysqldump</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysqlpump</code>
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/bin/mysqlbackup</code> (for MySQL Enterprise Edition
                    8.0 only)
                  </p></li><li class="listitem"><p>
                    <code class="filename">/usr/sbin/mysqld</code>
</p></li></ul>
</div>
<p>
            </p></li><li class="listitem"><p>
              All binaries are stripped; they contain no debug
              information.
</p></li></ul>
</div>
<p>
</p>
<h5><a name="docker-configuring-server"></a>Configuring the MySQL Server</h5>
<p>
        When you start the MySQL Docker container, you can pass
        configuration options to the server through the <span class="command"><strong>docker
        run</strong></span> command. For example:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name mysql1 -d mysql/mysql-server:<em class="replaceable"><code>tag</code></em> --character-set-server=utf8mb4 --collation-server=utf8mb4_col</code></strong></pre><p>
        The command starts your MySQL Server with
        <code class="literal">utf8mb4</code> as the default character set and
        <code class="literal">utf8mb4_col</code> as the default collation for your
        databases.
      </p><p>
        Another way to configure the MySQL Server is to prepare a
        configuration file and mount it at the location of the server
        configuration file inside the container. See
        <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a> for
        details.
</p>
<h5><a name="docker-persisting-data-configuration"></a>Persisting Data and Configuration Changes</h5>
<p>
        Docker containers are in principle ephemeral, and any data or
        configuration are expected to be lost if the container is
        deleted or corrupted (see discussions
        <a class="ulink" href="https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/" target="_top">here</a>).
        <a class="ulink" href="https://docs.docker.com/engine/admin/volumes/volumes/" target="_top">Docker
        volumes</a>, however, provides a mechanism to persist data
        created inside a Docker container. At its initialization, the
        MySQL Server container creates a Docker volume for the server
        data directory. The JSON output for running the <span class="command"><strong>docker
        inspect</strong></span> command on the container has a
        <code class="literal">Mount</code> key, whose value provides information
        on the data directory volume:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker inspect mysql1</code></strong> 
...
 "Mounts": [
            {
                "Type": "volume",
                "Name": "4f2d463cfc4bdd4baebcb098c97d7da3337195ed2c6572bc0b89f7e845d27652",
                "Source": "/var/lib/docker/volumes/4f2d463cfc4bdd4baebcb098c97d7da3337195ed2c6572bc0b89f7e845d27652/_data",
                "Destination": "/var/lib/mysql",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
...
</pre><p>
        The output shows that the source folder
        <code class="filename">/var/lib/docker/volumes/4f2d463cfc4bdd4baebcb098c97d7da3337195ed2c6572bc0b89f7e845d27652/_data</code>,
        in which data is persisted on the host, has been mounted at
        <code class="filename">/var/lib/mysql</code>, the server data directory
        inside the container.
      </p><p>
        Another way to preserve data is to
        <a class="ulink" href="https://docs.docker.com/engine/reference/commandline/service_create/#add-bind-mounts-volumes-or-memory-filesystems" target="_top">bind-mount</a>
        a host directory using the <code class="option">--mount</code> option when
        creating the container. The same technique can be used to
        persist the configuration of the server. The following command
        creates a MySQL Server container and bind-mounts both the data
        directory and the server configuration file:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysql1 \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/my.cnf</code></em>,dst=/etc/my.cnf \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/datadir</code></em>,dst=/var/lib/mysql \
-d mysql/mysql-server:<em class="replaceable"><code>tag</code></em> </code></strong></pre><p>
        The command mounts
        <code class="filename"><em class="replaceable"><code>path-on-host-machine/my.cnf</code></em></code>
        at <code class="filename"><code class="filename">/etc/my.cnf</code></code> (the
        server configuration file inside the container), and
        <code class="filename"><em class="replaceable"><code>path-on-host-machine/datadir</code></em></code>
        at <code class="filename"><code class="filename">/var/lib/mysql</code></code> (the
        data directory inside the container). The following conditions
        must be met for the bind-mounting to work:

</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              The configuration file
              <code class="filename"><em class="replaceable"><code>path-on-host-machine/my.cnf</code></em></code>
              must already exist, and it must contain the specification
              for starting the server using the user
              <code class="literal">mysql</code>:
            </p><pre data-lang="ini" class="programlisting">[mysqld]
user=mysql</pre><p>
              You can also include other server configuration options in
              the file.
            </p></li><li class="listitem"><p>
              The data directory
              <code class="filename"><em class="replaceable"><code>path-on-host-machine/datadir</code></em></code>
              must already exist. For server initialization to happen,
              the directory must be empty. You can also mount a
              directory prepopulated with data and start the server with
              it; however, you must make sure you start the Docker
              container with the same configuration as the server that
              created the data, and any host files or directories
              required are mounted when starting the container.
</p></li></ul>
</div>
<p>
</p>
<h5><a name="docker-additional-init"></a>Running Additional Initialization Scripts</h5>
<p>
        If there are any <code class="filename">.sh</code> or
        <code class="filename">.sql</code> scripts you want to run on the
        database immediately after it has been created, you can put them
        into a host directory and then mount the directory at
        <code class="filename">/docker-entrypoint-initdb.d/</code> inside the
        container. For example:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysql1 \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/scripts/</code></em>,dst=/docker-entrypoint-initdb.d/ \
-d mysql/mysql-server:<em class="replaceable"><code>tag</code></em></code></strong></pre>
<h5><a name="docker-app-in-another-container"></a>Connect to MySQL from an Application in Another Docker Container</h5>
<p>
        By setting up a Docker network, you can allow multiple Docker
        containers to communicate with each other, so that a client
        application in another Docker container can access the MySQL
        Server in the server container. First, create a Docker network:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker network create <em class="replaceable"><code>my-custom-net</code></em></code></strong></pre><p>
        Then, when you are creating and starting the server and the
        client containers, use the <code class="option">--network</code> option to
        put them on network you created. For example:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysql1 --network=<em class="replaceable"><code>my-custom-net</code></em> -d mysql/mysql-server</code></strong></pre><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=myapp1 --network=<em class="replaceable"><code>my-custom-net</code></em> -d myapp</code></strong></pre><p>
        The <code class="literal">myapp1</code> container can then connect to the
        <code class="literal">mysql1</code> container with the
        <code class="literal">mysql1</code> hostname and vice versa, as Docker
        automatically sets up a DNS for the given container names. In
        the following example, we run the
        <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong><code class="literal">mysq</code>l</strong></span></a> client from inside
        the <code class="literal">myapp1</code> container to connect to host
        <code class="literal">mysql1</code> in its own container:
      </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker exec -it myapp1 mysql --host=mysql1 --user=myuser --password</code></strong></pre><p>
        For other networking techniques for containers, see the
        <a class="ulink" href="https://docs.docker.com/engine/userguide/networking/" target="_top">Docker
        container networking</a> section in the Docker
        Documentation.
</p>
<h5><a name="docker-server-error-log"></a>Server Error Log</h5>
<p>
        When the MySQL Server is first started with your server
        container, a <a class="link" href="server-administration.html#error-log" title="5.4.2 The Error Log">server error log</a>
        is NOT generated if either of the following conditions is true:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            A server configuration file from the host has been mounted,
            but the file does not contain the system variable
            <a class="link" href="server-administration.html#sysvar_log_error"><code class="literal">log_error</code></a> (see
            <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a> on
            bind-mounting a server configuration file).
          </p></li><li class="listitem"><p>
            A server configuration file from the host has not been
            mounted, but the Docker environment variable
            <a class="link" href="installing.html#docker_var_mysql-log-console"><code class="option">MYSQL_LOG_CONSOLE</code></a>
            is <code class="literal">true</code> (which is the variable's default
            state for MySQL 8.0 server containers). The MySQL Server's
            error log is then redirected to <code class="literal">stderr</code>,
            so that the error log goes into the Docker container's log
            and is viewable using the <span class="command"><strong>docker logs
            <em class="replaceable"><code>mysqld-container</code></em></strong></span>
            command.
</p></li></ul>
</div>
<p>
        To make MySQL Server generate an error log when either of the
        two conditions is true, use the
        <a class="link" href="server-administration.html#option_mysqld_log-error"><code class="option">--log-error</code></a> option to
        <a class="link" href="installing.html#docker-configuring-server" title="Configuring the MySQL Server">configure the
        server</a> to generate the error log at a specific location
        inside the container. To persist the error log, mount a host
        file at the location of the error log inside the container as
        explained in
        <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a>. However,
        you must make sure your MySQL Server inside its container has
        write access to the mounted host file.
</p>
<h5><a name="docker-meb"></a>Using MySQL Enterprise Backup with Docker</h5>
<p>
        <a class="ulink" href="https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/" target="_top">MySQL Enterprise
        Backup</a> is a commercially-licensed backup utility for
        MySQL Server, available with
        <a class="ulink" href="https://www.mysql.com/products/enterprise/" target="_top">MySQL
        Enterprise Edition</a>. MySQL Enterprise Backup is included in the Docker
        installation of MySQL Enterprise Edition.
      </p><p>
        In the following example, we assume that you already have a
        MySQL Server running in a Docker container (see
        <a class="xref" href="installing.html#docker-mysql-getting-started" title="2.5.6.1 Basic Steps for MySQL Server Deployment with Docker">Section 2.5.6.1, “Basic Steps for MySQL Server Deployment with Docker”</a> on how to start a
        MySQL Server instance with Docker). For MySQL Enterprise Backup to back up the
        MySQL Server, it must have access to the server's data
        directory. This can be achieved by, for example,
        <a class="link" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">bind-mounting
        a host directory on the data directory of the MySQL
        Server</a> when you start the server:

</p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysqlserver \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/datadir/</code></em>,dst=/var/lib/mysql \
-d mysql/enterprise-server:8.0</code></strong></pre><p>
      </p><p>
        With this command, the MySQL Server is started with a Docker
        image of the MySQL Enterprise Edition, and the host directory
        <em class="replaceable"><code>/path-on-host-machine/datadir/</code></em> has
        been mounted onto the server's data directory
        (<code class="filename">/var/lib/mysql</code>) inside the server
        container. We also assume that, after the server has been
        started, the required privileges have also been set up for MySQL Enterprise Backup
        to access the server (see
        <a class="ulink" href="https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/mysqlbackup.privileges.html" target="_top">Grant MySQL Privileges to Backup Administrator</a> for details). Use the
        following steps then to backup and restore a MySQL Server
        instance.
      </p><p>
        <span class="emphasis"><em>To backup a MySQL Server instance running in a Docker
        container using MySQL Enterprise Backup with Docker</em></span>:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            On the same host where the MySQL Server container is
            running, start another container with an image of MySQL
            Enterprise Edition to perform a back up with the MySQL Enterprise Backup
            command <a class="ulink" href="https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/backup-commands-backup.html#option_meb_backup-to-image" target="_top"><code class="option">backup-to-image</code></a>. Provide
            access to the server's data directory using the bind mount
            we created in the last step. Also, mount a host directory
            (<em class="replaceable"><code>/path-on-host-machine/backups/</code></em>
            in this example) onto the storage folder for backups in the
            container (<code class="filename">/data/backups</code> in the
            example) to persist the backups we are creating. Here is a
            sample command for this step, in which MySQL Enterprise Backup is started with
            a Docker image downloaded from
            <a class="ulink" href="https://support.oracle.com/" target="_top">My Oracle
            Support</a>):
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker run \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/datadir/</code></em>,dst=/var/lib/mysql \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/backups/</code></em>,dst=/data/backups \ 
--rm mysql/enterprise-server:8.0 \
mysqlbackup -u<em class="replaceable"><code>mysqlbackup</code></em> -p<em class="replaceable"><code>password</code></em> --backup-dir=/tmp/backup-tmp --with-timestamp \
--backup-image=/data/backups/db.mbi backup-to-image</code></strong>

[Entrypoint] MySQL Docker Image 8.0.11-1.1.5
MySQL Enterprise Backup version 8.0.11 Linux-4.1.12-61.1.16.el7uek.x86_64-x86_64 [2018-04-08  07:06:45] 
Copyright (c) 2003, 2018, Oracle and/or its affiliates. All Rights Reserved.

180921 17:27:25 MAIN    INFO: A thread created with Id '140594390935680' 
180921 17:27:25 MAIN    INFO: Starting with following command line ...
...

-------------------------------------------------------------
   Parameters Summary         
-------------------------------------------------------------
   Start LSN                  : 29615616
   End LSN                    : 29651854
-------------------------------------------------------------

mysqlbackup completed OK!
</pre><p>
            It is important to check the end of the output by
            <span class="command"><strong>mysqlbackup</strong></span> to make sure the backup has
            been completed successfully.
          </p></li><li class="listitem"><p>
            The container exits once the backup job is finished and,
            with the <code class="literal">--rm</code> option used to start it, it
            is removed after it exits. An image backup has been created,
            and can be found in the host directory mounted in the last
            step for storing backups:

</p><pre data-lang="terminal" class="programlisting">shell&gt; ls /tmp/backups
db.mbi</pre><p>
</p></li></ol>
</div>
<p>
        <span class="emphasis"><em>To restore a MySQL Server instance in a Docker
        container using MySQL Enterprise Backup with Docker</em></span>:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Stop the MySQL Server container, which also stops the MySQL
            Server running inside:
          </p><pre data-lang="terminal" class="programlisting">docker stop mysqlserver</pre></li><li class="listitem"><p>
            On the host, delete all contents in the bind mount for the
            MySQL Server data directory:
          </p><pre data-lang="terminal" class="programlisting">rm -rf <em class="replaceable"><code>/path-on-host-machine/datadir</code></em>/*
</pre></li><li class="listitem"><p>
            Start a container with an image of MySQL Enterprise Edition
            to perform the restore with the MySQL Enterprise Backup command
            <a class="ulink" href="https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/backup-commands-restore.html#option_meb_copy-back-and-apply-log" target="_top"><code class="option">copy-back-and-apply-log</code></a>.
            Bind-mount the server's data directory and the storage
            folder for the backups, like what we did when we backed up
            the server:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>docker run \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/datadir/</code></em>,dst=/var/lib/mysql \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/backups/</code></em>,dst=/data/backups \ 
--rm mysql/enterprise-server:8.0 \
mysqlbackup --backup-dir=/tmp/backup-tmp --with-timestamp \
--datadir=/var/lib/mysql --backup-image=/data/backups/db.mbi copy-back-and-apply-log</code></strong>

[Entrypoint] MySQL Docker Image 8.0.11-1.1.5
MySQL Enterprise Backup version 8.0.11 Linux-4.1.12-61.1.16.el7uek.x86_64-x86_64 [2018-04-08  07:06:45] 
Copyright (c) 2003, 2018, Oracle and/or its affiliates. All Rights Reserved.

180921 22:06:52 MAIN    INFO: A thread created with Id '139768047519872' 
180921 22:06:52 MAIN    INFO: Starting with following command line ...
...
180921 22:06:52 PCR1    INFO: We were able to parse ibbackup_logfile up to
          lsn 29680612.
180921 22:06:52 PCR1    INFO: Last MySQL binlog file position 0 155, file name binlog.000003
180921 22:06:52 PCR1    INFO: The first data file is '/var/lib/mysql/ibdata1'
                              and the new created log files are at '/var/lib/mysql'
180921 22:06:52 MAIN    INFO: No Keyring file to process.
180921 22:06:52 MAIN    INFO: Apply-log operation completed successfully.
180921 22:06:52 MAIN    INFO: Full Backup has been restored successfully.

mysqlbackup completed OK! with 3 warnings
</pre><p>
            The container exits once the backup job is finished and,
            with the <code class="literal">--rm</code> option used when starting
            it, it is removed after it exits.
          </p></li><li class="listitem"><p>
            Restart the server container, which also restarts the
            restored server:
          </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker restart mysqlserver</code></strong></pre><p>
            Or, start a new MySQL Server on the restored data directory:
          </p><pre data-lang="terminal" class="programlisting"><strong class="userinput"><code>docker run --name=mysqlserver2 \
--mount type=bind,src=<em class="replaceable"><code>/path-on-host-machine/datadir/</code></em>,dst=/var/lib/mysql \
-d mysql/enterprise-server:8.0</code></strong></pre><p>
            Log on to the server to check that the server is running
            with the restored data.
</p></li></ol>
</div>
<h5><a name="docker-environment-variables"></a>Docker Environment Variables</h5>
<p>
        When you create a MySQL Server container, you can configure the
        MySQL instance by using the <code class="option">--env</code> option
        (<code class="option">-e</code> in short) and specifying one or more of the
        following environment variables.

</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Notes
</div>

<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                None of the variables below has any effect if the data
                directory you mount is not empty, as no server
                initialization is going to be attempted then (see
                <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a>
                for more details). Any pre-existing contents in the
                folder, including any old server settings, are not
                modified during the container startup.
              </p></li><li class="listitem"><p>
                The boolean variables including
                <a class="link" href="installing.html#docker_var_mysql_random_root_password"><code class="option">MYSQL_RANDOM_ROOT_PASSWORD</code></a>,
                <a class="link" href="installing.html#docker_var_mysql_onetime_password"><code class="option">MYSQL_ONETIME_PASSWORD</code></a>,
                <a class="link" href="installing.html#docker_var_mysql-allow-empty-password"><code class="option">MYSQL_ALLOW_EMPTY_PASSWORD</code></a>,
                and
                <a class="link" href="installing.html#docker_var_mysql-log-console"><code class="option">MYSQL_LOG_CONSOLE</code></a>
                are made true by setting them with any strings of
                nonzero lengths.



                Therefore, setting them to, for example,
                <span class="quote">“<span class="quote">0</span>”</span>, <span class="quote">“<span class="quote">false</span>”</span>, or
                <span class="quote">“<span class="quote">no</span>”</span> does not make them false, but actually
                makes them true. This is a known issue of the MySQL
                Server containers.
</p></li></ul>
</div>

</div>
<p>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="docker_var_mysql_random_root_password"></a>
            <a class="link" href="installing.html#docker_var_mysql_random_root_password"><code class="option">MYSQL_RANDOM_ROOT_PASSWORD</code></a>:
            When this variable is true (which is its default state,
            unless
            <a class="link" href="installing.html#docker_var_mysql-root-password"><code class="option">MYSQL_ROOT_PASSWORD</code></a>
            is set or
            <a class="link" href="installing.html#docker_var_mysql-allow-empty-password"><code class="option">MYSQL_ALLOW_EMPTY_PASSWORD</code></a>
            is set to true), a random password for the server's root
            user is generated when the Docker container is started. The
            password is printed to <code class="literal">stdout</code> of the
            container and can be found by looking at the container’s
            log (see <a class="xref" href="installing.html#docker-starting-mysql-server" title="Starting a MySQL Server Instance">Starting a MySQL Server Instance</a>).
          </p></li><li class="listitem"><p><a name="docker_var_mysql_onetime_password"></a>
            <a class="link" href="installing.html#docker_var_mysql_onetime_password"><code class="option">MYSQL_ONETIME_PASSWORD</code></a>:
            When the variable is true (which is its default state,
            unless
            <a class="link" href="installing.html#docker_var_mysql-root-password"><code class="option">MYSQL_ROOT_PASSWORD</code></a>
            is set or
            <a class="link" href="installing.html#docker_var_mysql-allow-empty-password"><code class="option">MYSQL_ALLOW_EMPTY_PASSWORD</code></a>
            is set to true), the root user's password is set as expired
            and must be changed before MySQL can be used normally.
          </p></li><li class="listitem"><p><a name="docker_var_mysql_database"></a>
            <a class="link" href="installing.html#docker_var_mysql_database"><code class="option">MYSQL_DATABASE</code></a>:
            This variable allows you to specify the name of a database
            to be created on image startup. If a user name and a
            password are supplied with
            <a class="link" href="installing.html#docker_var_mysql_user_password"><code class="option">MYSQL_USER</code></a>
            and
            <a class="link" href="installing.html#docker_var_mysql_user_password"><code class="option">MYSQL_PASSWORD</code></a>,
            the user is created and granted superuser access to this
            database (corresponding to <code class="literal">GRANT ALL</code>).
            The specified database is created by a
            <a class="link" href="sql-statements.html#create-database" title="13.1.12 CREATE DATABASE Statement">CREATE DATABASE IF NOT
            EXIST</a> statement, so that the variable has no effect
            if the database already exists.
          </p></li><li class="listitem"><p><a name="docker_var_mysql_user_password"></a>
            <a class="link" href="installing.html#docker_var_mysql_user_password"><code class="option">MYSQL_USER</code></a>,
            <a class="link" href="installing.html#docker_var_mysql_user_password"><code class="option">MYSQL_PASSWORD</code></a>:
            These variables are used in conjunction to create a user and
            set that user's password, and the user is granted superuser
            permissions for the database specified by the
            <a class="link" href="installing.html#docker_var_mysql_database"><code class="option">MYSQL_DATABASE</code></a>
            variable. Both
            <a class="link" href="installing.html#docker_var_mysql_user_password"><code class="option">MYSQL_USER</code></a>
            and
            <a class="link" href="installing.html#docker_var_mysql_user_password"><code class="option">MYSQL_PASSWORD</code></a>
            are required for a user to be created—if any of the
            two variables is not set, the other is ignored. If both
            variables are set but
            <a class="link" href="installing.html#docker_var_mysql_database"><code class="option">MYSQL_DATABASE</code></a>
            is not, the user is created without any privileges.

</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
                There is no need to use this mechanism to create the
                root superuser, which is created by default with the
                password set by either one of the mechanisms discussed
                in the descriptions for
                <a class="link" href="installing.html#docker_var_mysql-root-password"><code class="option">MYSQL_ROOT_PASSWORD</code></a>
                and
                <a class="link" href="installing.html#docker_var_mysql_random_root_password"><code class="option">MYSQL_RANDOM_ROOT_PASSWORD</code></a>,
                unless
                <a class="link" href="installing.html#docker_var_mysql-allow-empty-password"><code class="option">MYSQL_ALLOW_EMPTY_PASSWORD</code></a>
                is true.
</p>
</div>
<p>
          </p></li><li class="listitem"><p><a name="docker_var_mysql-root-host"></a>
            <a class="link" href="installing.html#docker_var_mysql-root-host"><code class="option">MYSQL_ROOT_HOST</code></a>:
            By default, MySQL creates the
            <code class="literal">'root'@'localhost'</code> account. This account
            can only be connected to from inside the container as
            described in
            <a class="xref" href="installing.html#docker-connecting-within-container" title="Connecting to MySQL Server from within the Container">Connecting to MySQL Server from within the Container</a>. To
            allow root connections from other hosts, set this
            environment variable. For example, the value
            <code class="literal">172.17.0.1</code>, which is the default Docker
            gateway IP, allows connections from the host machine that
            runs the container. The option accepts only one entry, but
            wildcards are allowed (for example,
            <code class="option">MYSQL_ROOT_HOST=172.*.*.*</code> or
            <code class="option">MYSQL_ROOT_HOST=%</code>).
          </p></li><li class="listitem"><p><a name="docker_var_mysql-log-console"></a>
            <a class="link" href="installing.html#docker_var_mysql-log-console"><code class="option">MYSQL_LOG_CONSOLE</code></a>:
            When the variable is true (which is its default state for
            MySQL 8.0 server containers), the MySQL Server's error log
            is redirected to <code class="literal">stderr</code>, so that the
            error log goes into the Docker container's log and is
            viewable using the <span class="command"><strong>docker logs
            <em class="replaceable"><code>mysqld-container</code></em></strong></span>
            command.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              The variable has no effect if a server configuration file
              from the host has been mounted (see
              <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a> on
              bind-mounting a configuration file).
</p>
</div>
</li><li class="listitem"><p><a name="docker_var_mysql-root-password"></a>
            <a class="link" href="installing.html#docker_var_mysql-root-password"><code class="option">MYSQL_ROOT_PASSWORD</code></a>:
            This variable specifies a password that is set for the MySQL
            root account.

</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
                Setting the MySQL root user password on the command line
                is insecure. As an alternative to specifying the
                password explicitly, you can set the variable with a
                container file path for a password file, and then mount
                a file from your host that contains the password at the
                container file path. This is still not very secure, as
                the location of the password file is still exposed. It
                is preferable to use the default settings of
                <a class="link" href="installing.html#docker_var_mysql_random_root_password"><code class="option">MYSQL_RANDOM_ROOT_PASSWORD</code></a>
                and
                <a class="link" href="installing.html#docker_var_mysql_onetime_password"><code class="option">MYSQL_ONETIME_PASSWORD</code></a>
                both being true.
</p>
</div>
<p>
          </p></li><li class="listitem"><p><a name="docker_var_mysql-allow-empty-password"></a>
            <a class="link" href="installing.html#docker_var_mysql-allow-empty-password"><code class="option">MYSQL_ALLOW_EMPTY_PASSWORD</code></a>.
            Set it to true to allow the container to be started with a
            blank password for the root user.

</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
                Setting this variable to true is insecure, because it is
                going to leave your MySQL instance completely
                unprotected, allowing anyone to gain complete superuser
                access. It is preferable to use the default settings of
                <a class="link" href="installing.html#docker_var_mysql_random_root_password"><code class="option">MYSQL_RANDOM_ROOT_PASSWORD</code></a>
                and
                <a class="link" href="installing.html#docker_var_mysql_onetime_password"><code class="option">MYSQL_ONETIME_PASSWORD</code></a>
                both being true.
</p>
</div>
<p>
</p></li></ul>
</div>

</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="deploy-mysql-nonlinux-docker"></a>2.5.6.3 Deploying MySQL on Windows and Other Non-Linux Platforms with Docker</h4>

</div>

</div>

</div>
<a class="indexterm" name="idm46444441082976"></a>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
          The MySQL Docker images provided by Oracle are built
          specifically for Linux platforms. Other platforms are not
          supported, and users running the MySQL Docker images from
          Oracle on them are doing so at their own risk. This section
          discusses some known issues for the images when used on
          non-Linux platforms.
</p>
</div>
<p>
        Known Issues for using the MySQL Server Docker images from
        Oracle on Windows include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If you are bind-mounting on the container's MySQL data
            directory (see
            <a class="xref" href="installing.html#docker-persisting-data-configuration" title="Persisting Data and Configuration Changes">Persisting Data and Configuration Changes</a> for
            details), you have to set the location of the server socket
            file with the <a class="link" href="server-administration.html#sysvar_socket"><code class="option">--socket</code></a> option
            to somewhere outside of the MySQL data directory; otherwise,
            the server will fail to start. This is because the way
            Docker for Windows handles file mounting does not allow a
            host file from being bind-mounted on the socket file.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-native"></a>2.5.7 Installing MySQL on Linux from the Native Software Repositories</h3>

</div>

</div>

</div>
<p>
      Many Linux distributions include a version of the MySQL server,
      client tools, and development components in their native software
      repositories and can be installed with the platforms' standard
      package management systems. This section provides basic
      instructions for installing MySQL using those package management
      systems.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
        Native packages are often several versions behind the currently
        available release. You will also normally be unable to install
        development milestone releases (DMRs), as these are not usually
        made available in the native repositories. Before proceeding, we
        recommend that you check out the other installation options
        described in <a class="xref" href="installing.html#linux-installation" title="2.5 Installing MySQL on Linux">Section 2.5, “Installing MySQL on Linux”</a>.
</p>
</div>
<p>
      Distribution specific instructions are shown below:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <span class="bold"><strong>Red Hat Linux, Fedora, CentOS</strong></span>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            For a number of Linux distributions, you can install MySQL
            using the MySQL Yum repository instead of the platform's
            native software repository. See
            <a class="xref" href="installing.html#linux-installation-yum-repo" title="2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository">Section 2.5.1, “Installing MySQL on Linux Using the MySQL Yum Repository”</a> for details.
</p>
</div>
<p>
          For Red Hat and similar distributions, the MySQL distribution
          is divided into a number of separate packages,
          <code class="literal">mysql</code> for the client tools,
          <code class="literal">mysql-server</code> for the server and associated
          tools, and <code class="literal">mysql-libs</code> for the libraries.
          The libraries are required if you want to provide connectivity
          from different languages and environments such as Perl, Python
          and others.
        </p><p>
          To install, use the <span class="command"><strong>yum</strong></span> command to specify
          the packages that you want to install. For example:
        </p><pre data-lang="terminal" class="programlisting">root-shell&gt; yum install mysql mysql-server mysql-libs mysql-server
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package mysql.x86_64 0:5.1.48-2.fc13 set to be updated
---&gt; Package mysql-libs.x86_64 0:5.1.48-2.fc13 set to be updated
---&gt; Package mysql-server.x86_64 0:5.1.48-2.fc13 set to be updated
--&gt; Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.48-2.fc13.x86_64
--&gt; Running transaction check
---&gt; Package perl-DBD-MySQL.x86_64 0:4.017-1.fc13 set to be updated
--&gt; Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch          Version               Repository      Size
================================================================================
Installing:
 mysql                 x86_64        5.1.48-2.fc13         updates        889 k
 mysql-libs            x86_64        5.1.48-2.fc13         updates        1.2 M
 mysql-server          x86_64        5.1.48-2.fc13         updates        8.1 M
Installing for dependencies:
 perl-DBD-MySQL        x86_64        4.017-1.fc13          updates        136 k

Transaction Summary
================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

Total download size: 10 M
Installed size: 30 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 10 M
(1/4): mysql-5.1.48-2.fc13.x86_64.rpm                    | 889 kB     00:04
(2/4): mysql-libs-5.1.48-2.fc13.x86_64.rpm               | 1.2 MB     00:06
(3/4): mysql-server-5.1.48-2.fc13.x86_64.rpm             | 8.1 MB     00:40
(4/4): perl-DBD-MySQL-4.017-1.fc13.x86_64.rpm            | 136 kB     00:00
--------------------------------------------------------------------------------
Total                                           201 kB/s |  10 MB     00:52
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mysql-libs-5.1.48-2.fc13.x86_64                          1/4
  Installing     : mysql-5.1.48-2.fc13.x86_64                               2/4
  Installing     : perl-DBD-MySQL-4.017-1.fc13.x86_64                       3/4
  Installing     : mysql-server-5.1.48-2.fc13.x86_64                        4/4

Installed:
  mysql.x86_64 0:5.1.48-2.fc13            mysql-libs.x86_64 0:5.1.48-2.fc13
  mysql-server.x86_64 0:5.1.48-2.fc13

Dependency Installed:
  perl-DBD-MySQL.x86_64 0:4.017-1.fc13

Complete!</pre><p>
          MySQL and the MySQL server should now be installed. A sample
          configuration file is installed into
          <code class="filename">/etc/my.cnf</code>. An init script, to start and
          stop the server, will have been installed into
          <code class="filename">/etc/init.d/mysqld</code>. To start the MySQL
          server use <span class="command"><strong>service</strong></span>:
        </p><pre data-lang="terminal" class="programlisting">root-shell&gt; service mysqld start</pre><p>
          To enable the server to be started and stopped automatically
          during boot, use <span class="command"><strong>chkconfig</strong></span>:
        </p><pre data-lang="terminal" class="programlisting">root-shell&gt; chkconfig --levels 235 mysqld on</pre><p>
          Which enables the MySQL server to be started (and stopped)
          automatically at the specified the run levels.
        </p><p>
          The database tables will have been automatically created for
          you, if they do not already exist. You should, however, run
          <a class="link" href="programs.html#mysql-secure-installation" title="4.4.2 mysql_secure_installation — Improve MySQL Installation Security"><span class="command"><strong>mysql_secure_installation</strong></span></a> to set the root
          passwords on your server.
        </p></li><li class="listitem"><p>
          <span class="bold"><strong>Debian, Ubuntu, Kubuntu</strong></span>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            For supported Debian and Ubuntu versions, MySQL can be
            installed using the
            <a class="ulink" href="https://dev.mysql.com/downloads/repo/apt/" target="_top">MySQL APT
            Repository</a> instead of the platform's native software
            repository. See
            <a class="xref" href="installing.html#linux-installation-apt-repo" title="2.5.2 Installing MySQL on Linux Using the MySQL APT Repository">Section 2.5.2, “Installing MySQL on Linux Using the MySQL APT Repository”</a> for details.
</p>
</div>
<p>
          On Debian and related distributions, there are two packages
          for MySQL in their software repositories,
          <code class="literal">mysql-client</code> and
          <code class="literal">mysql-server</code>, for the client and server
          components respectively. You should specify an explicit
          version, for example <code class="literal">mysql-client-5.1</code>, to
          ensure that you install the version of MySQL that you want.
        </p><p>
          To download and install, including any dependencies, use the
          <span class="command"><strong>apt-get</strong></span> command, specifying the packages
          that you want to install.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            Before installing, make sure that you update your
            <code class="literal">apt-get</code> index files to ensure you are
            downloading the latest available version.
</p>
</div>
<p>
          A sample installation of the MySQL packages might look like
          this (some sections trimmed for clarity):
        </p><pre data-lang="terminal" class="programlisting">root-shell&gt; apt-get install mysql-client-5.1 mysql-server-5.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.28-11 linux-headers-2.6.28-11-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  bsd-mailx libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libmysqlclient15off libmysqlclient16 libnet-daemon-perl libplrpc-perl mailx
  mysql-common postfix
Suggested packages:
  dbishell libipc-sharedcache-perl tinyca procmail postfix-mysql postfix-pgsql
  postfix-ldap postfix-pcre sasl2-bin resolvconf postfix-cdb
The following NEW packages will be installed
  bsd-mailx libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libmysqlclient15off libmysqlclient16 libnet-daemon-perl libplrpc-perl mailx
  mysql-client-5.1 mysql-common mysql-server-5.1 postfix
0 upgraded, 13 newly installed, 0 to remove and 182 not upgraded.
Need to get 1907kB/25.3MB of archives.
After this operation, 59.5MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get: 1 http://gb.archive.ubuntu.com jaunty-updates/main mysql-common 5.1.30really5.0.75-0ubuntu10.5 [63.6kB]
Get: 2 http://gb.archive.ubuntu.com jaunty-updates/main libmysqlclient15off 5.1.30really5.0.75-0ubuntu10.5 [1843kB]
Fetched 1907kB in 9s (205kB/s)
Preconfiguring packages ...
Selecting previously deselected package mysql-common.
(Reading database ... 121260 files and directories currently installed.)
...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Setting up libnet-daemon-perl (0.43-1) ...
Setting up libplrpc-perl (0.2020-1) ...
Setting up libdbi-perl (1.607-1) ...
Setting up libmysqlclient15off (5.1.30really5.0.75-0ubuntu10.5) ...

Setting up libdbd-mysql-perl (4.008-1) ...
Setting up libmysqlclient16 (5.1.31-1ubuntu2) ...

Setting up mysql-client-5.1 (5.1.31-1ubuntu2) ...

Setting up mysql-server-5.1 (5.1.31-1ubuntu2) ...
 * Stopping MySQL database server mysqld
   ...done.
2013-09-24T13:03:09.048353Z 0 [Note] InnoDB: 8.0.22 started; log sequence number 1566036
2013-09-24T13:03:10.057269Z 0 [Note] InnoDB: Starting shutdown...
2013-09-24T13:03:10.857032Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1566036
 * Starting MySQL database server mysqld
   ...done.
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            The <span class="command"><strong>apt-get</strong></span> command will install a number
            of packages, including the MySQL server, in order to provide
            the typical tools and application environment. This can mean
            that you install a large number of packages in addition to
            the main MySQL package.
</p>
</div>
<p>
          During installation, the initial database will be created, and
          you will be prompted for the MySQL root password (and
          confirmation). A configuration file will have been created in
          <code class="filename">/etc/mysql/my.cnf</code>. An init script will
          have been created in <code class="filename">/etc/init.d/mysql</code>.
        </p><p>
          The server will already be started. You can manually start and
          stop the server using:
        </p><pre data-lang="terminal" class="programlisting">root-shell&gt; service mysql [start|stop]</pre><p>
          The service will automatically be added to the 2, 3 and 4 run
          levels, with stop scripts in the single, shutdown and restart
          levels.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="linux-installation-juju"></a>2.5.8 Installing MySQL on Linux with Juju</h3>

</div>

</div>

</div>
<p>
      The Juju deployment framework supports easy installation and
      configuration of MySQL servers. For instructions, see
      <a class="ulink" href="https://jujucharms.com/mysql/" target="_top">https://jujucharms.com/mysql/</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="using-systemd"></a>2.5.9 Managing MySQL Server with systemd</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444441020608"></a><p>
      If you install MySQL using an RPM or Debian package on the
      following Linux platforms, server startup and shutdown is managed
      by systemd:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          RPM package platforms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Enterprise Linux variants version 7 and higher
            </p></li><li class="listitem"><p>
              SUSE Linux Enterprise Server 12 and higher
            </p></li><li class="listitem"><p>
              Fedora 29 and higher
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Debian package platforms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Debian 8 and higher
            </p></li><li class="listitem"><p>
              Ubuntu 16 and higher
</p></li></ul>
</div>
</li></ul>
</div>
<p>
      If you install MySQL from a generic binary distribution on a
      platform that uses systemd, you can manually configure systemd
      support for MySQL following the instructions provided in the
      post-installation setup section of the
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-secure-deployment-guide/en/" target="_top">MySQL
      8.0 Secure Deployment Guide</a>.
    </p><p>
      If you install MySQL from a source distribution on a platform that
      uses systemd, obtain systemd support for MySQL by configuring the
      distribution using the
      <a class="link" href="installing.html#option_cmake_with_systemd"><code class="option">-DWITH_SYSTEMD=1</code></a>
      <span class="command"><strong>CMake</strong></span> option. See
      <a class="xref" href="installing.html#source-configuration-options" title="2.9.7 MySQL Source-Configuration Options">Section 2.9.7, “MySQL Source-Configuration Options”</a>.
    </p><p>
      The following discussion covers these topics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#systemd-overview" title="Overview of systemd">Overview of systemd</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#systemd-mysql-configuration" title="Configuring systemd for MySQL">Configuring systemd for MySQL</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#systemd-multiple-mysql-instances" title="Configuring Multiple MySQL Instances Using systemd">Configuring Multiple MySQL Instances Using systemd</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#mysqld-safe-to-systemd-migration" title="Migrating from mysqld_safe to systemd">Migrating from mysqld_safe to systemd</a></p></li></ul>
</div>

<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        On platforms for which systemd support for MySQL is installed,
        scripts such as <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> and the System V
        initialization script are unnecessary and are not installed. For
        example, <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> can handle server
        restarts, but systemd provides the same capability, and does so
        in a manner consistent with management of other services rather
        than by using an application-specific program.
      </p><p>
        Because systemd has the capability of managing multiple MySQL
        instances on platforms for which systemd support for MySQL is
        installed, <a class="link" href="programs.html#mysqld-multi" title="4.3.4 mysqld_multi — Manage Multiple MySQL Servers"><span class="command"><strong>mysqld_multi</strong></span></a> and
        <span class="command"><strong>mysqld_multi.server</strong></span> are unnecessary and are
        not installed.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="systemd-overview"></a>Overview of systemd</h4>

</div>

</div>

</div>
<p>
        systemd provides automatic MySQL server startup and shutdown. It
        also enables manual server management using the
        <span class="command"><strong>systemctl</strong></span> command. For example:
      </p><pre data-lang="terminal" class="programlisting">systemctl {start|stop|restart|status} mysqld</pre><p>
        Alternatively, use the <span class="command"><strong>service</strong></span> command (with
        the arguments reversed), which is compatible with System V
        systems:
</p><pre data-lang="terminal" class="programlisting">service mysqld {start|stop|restart|status}</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          For the <span class="command"><strong>systemctl</strong></span> or
          <span class="command"><strong>service</strong></span> commands, if the MySQL service name
          is not <code class="literal">mysqld</code>, use the appropriate name.
          For example, use <code class="literal">mysql</code> rather than
          <code class="literal">mysqld</code> on Debian-based and SLES systems.
</p>
</div>
<p>
        Support for systemd includes these files:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <code class="filename">mysqld.service</code> (RPM platforms),
            <code class="filename">mysql.service</code> (Debian platforms):
            systemd service unit configuration file, with details about
            the MySQL service.
          </p></li><li class="listitem"><p>
            <code class="filename">mysqld@.service</code> (RPM platforms),
            <code class="filename">mysql@.service</code> (Debian platforms): Like
            <code class="filename">mysqld.service</code> or
            <code class="filename">mysql.service</code>, but used for managing
            multiple MySQL instances.
          </p></li><li class="listitem"><p>
            <code class="filename">mysqld.tmpfiles.d</code>: File containing
            information to support the <code class="literal">tmpfiles</code>
            feature. This file is installed under the name
            <code class="filename">mysql.conf</code>.
          </p></li><li class="listitem"><p>
            <code class="filename">mysqld_pre_systemd</code> (RPM platforms),
            <code class="filename">mysql-system-start</code> (Debian platforms):
            Support script for the unit file. This script assists in
            creating the error log file only if the log location matches
            a pattern (<code class="literal">/var/log/mysql*.log</code> for RPM
            platforms, <code class="literal">/var/log/mysql/*.log</code> for
            Debian platforms). In other cases, the error log directory
            must be writable or the error log must be present and
            writable for the user running the <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
            process.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="systemd-mysql-configuration"></a>Configuring systemd for MySQL</h4>

</div>

</div>

</div>
<p>
        To add or change systemd options for MySQL, these methods are
        available:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Use a localized systemd configuration file.
          </p></li><li class="listitem"><p>
            Arrange for systemd to set environment variables for the
            MySQL server process.
          </p></li><li class="listitem"><p>
            Set the <code class="literal">MYSQLD_OPTS</code> systemd variable.
</p></li></ul>
</div>
<p>
        To use a localized systemd configuration file, create the
        <code class="filename">/etc/systemd/system/mysqld.service.d</code>
        directory if it does not exist. In that directory, create a file
        that contains a <code class="literal">[Service]</code> section listing the
        desired settings. For example:
      </p><pre data-lang="ini" class="programlisting">[Service]
LimitNOFILE=<em class="replaceable"><code>max_open_files</code></em>
Nice=<em class="replaceable"><code>nice_level</code></em>
LimitCore=<em class="replaceable"><code>core_file_limit</code></em>
Environment="LD_PRELOAD=<em class="replaceable"><code>/path/to/malloc/library</code></em>"
Environment="TZ=<em class="replaceable"><code>time_zone_setting</code></em>"
</pre><p>
        The discussion here uses <code class="filename">override.conf</code> as
        the name of this file. Newer versions of systemd support the
        following command, which opens an editor and permits you to edit
        the file:
      </p><pre data-lang="terminal" class="programlisting">systemctl edit mysqld  # RPM platforms
systemctl edit mysql   # Debian platforms</pre><p>
        Whenever you create or change
        <code class="filename">override.conf</code>, reload the systemd
        configuration, then tell systemd to restart the MySQL service:
      </p><pre data-lang="terminal" class="programlisting">systemctl daemon-reload
systemctl restart mysqld  # RPM platforms
systemctl restart mysql   # Debian platforms</pre><p>
        With systemd, the <code class="filename">override.conf</code>
        configuration method must be used for certain parameters, rather
        than settings in a <code class="literal">[mysqld]</code> or
        <code class="literal">[mysqld_safe]</code> group in a MySQL option file:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For some parameters, <code class="filename">override.conf</code> must
            be used because systemd itself must know their values and it
            cannot read MySQL option files to get them.
          </p></li><li class="listitem"><p>
            Parameters that specify values otherwise settable only using
            options known to <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> must be
            specified using systemd because there is no corresponding
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> parameter.
</p></li></ul>
</div>
<p>
        For additional information about using systemd rather than
        <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>, see
        <a class="xref" href="installing.html#mysqld-safe-to-systemd-migration" title="Migrating from mysqld_safe to systemd">Migrating from mysqld_safe to systemd</a>.
      </p><p>
        You can set the following parameters in
        <code class="filename">override.conf</code>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            To set the number of file descriptors available to the MySQL
            server, use <code class="literal">LimitNOFILE</code> in
            <code class="filename">override.conf</code> rather than the
            <a class="link" href="server-administration.html#sysvar_open_files_limit"><code class="literal">open_files_limit</code></a> system
            variable for <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> or
            <a class="link" href="programs.html#option_mysqld_safe_open-files-limit"><code class="option">--open-files-limit</code></a>
            option for <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>.
          </p></li><li class="listitem"><p>
            To set the maximum core file size, use
            <code class="literal">LimitCore</code> in
            <code class="filename">override.conf</code> rather than the
            <a class="link" href="programs.html#option_mysqld_safe_core-file-size"><code class="option">--core-file-size</code></a> option
            for <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>.
          </p></li><li class="listitem"><p>
            To set the scheduling priority for the MySQL server, use
            <code class="literal">Nice</code> in
            <code class="filename">override.conf</code> rather than the
            <a class="link" href="programs.html#option_mysqld_safe_nice"><code class="option">--nice</code></a> option for
            <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>.
</p></li></ul>
</div>
<p>
        Some MySQL parameters are configured using environment
        variables:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <code class="literal">LD_PRELOAD</code>: Set this variable if the
            MySQL server should use a specific memory-allocation
            library.
          </p><a class="indexterm" name="idm46444440923008"></a><a class="indexterm" name="idm46444440921920"></a><a class="indexterm" name="idm46444440920832"></a></li><li class="listitem"><p>
            <code class="literal">NOTIFY_SOCKET</code>: This environment variable
            specifies the socket that <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> uses to
            communicate notification of startup completion and service
            status change with systemd. It is set by systemd when the
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> service is started. The
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> service reads the variable setting
            and writes to the defined location.
          </p><p>
            In MySQL 8.0, <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> uses
            the <code class="literal">Type=notify</code> process startup type.
            (<code class="literal">Type=forking</code> was used in MySQL 5.7.)
            With <code class="literal">Type=notify</code>, systemd automatically
            configures a socket file and exports the path to the
            <code class="literal">NOTIFY_SOCKET</code> environment variable.
          </p><a class="indexterm" name="idm46444440909184"></a><a class="indexterm" name="idm46444440908096"></a></li><li class="listitem"><p>
            <code class="literal">TZ</code>: Set this variable to specify the
            default time zone for the server.
</p><a class="indexterm" name="idm46444440905024"></a><a class="indexterm" name="idm46444440903952"></a></li></ul>
</div>
<p>
        There are multiple ways to specify environment variable values
        for use by the MySQL server process managed by systemd:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Use <code class="literal">Environment</code> lines in the
            <code class="filename">override.conf</code> file. For the syntax, see
            the example in the preceding discussion that describes how
            to use this file.
          </p></li><li class="listitem"><p>
            Specify the values in the
            <code class="filename">/etc/sysconfig/mysql</code> file (create the
            file if it does not exist). Assign values using the
            following syntax:
          </p><pre data-lang="ini" class="programlisting">LD_PRELOAD=<em class="replaceable"><code>/path/to/malloc/library</code></em>
TZ=<em class="replaceable"><code>time_zone_setting</code></em>
</pre><p>
            After modifying <code class="filename">/etc/sysconfig/mysql</code>,
            restart the server to make the changes effective:
          </p><pre data-lang="terminal" class="programlisting">systemctl restart mysqld  # RPM platforms
systemctl restart mysql   # Debian platforms</pre></li></ul>
</div>
<a class="indexterm" name="idm46444440893232"></a><a class="indexterm" name="idm46444440892144"></a><p>
        To specify options for <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> without
        modifying systemd configuration files directly, set or unset the
        <code class="literal">MYSQLD_OPTS</code> systemd variable. For example:
      </p><pre data-lang="terminal" class="programlisting">systemctl set-environment MYSQLD_OPTS="--general_log=1"
systemctl unset-environment MYSQLD_OPTS</pre><p>
        <code class="literal">MYSQLD_OPTS</code> can also be set in the
        <code class="filename">/etc/sysconfig/mysql</code> file.
      </p><p>
        After modifying the systemd environment, restart the server to
        make the changes effective:
      </p><pre data-lang="terminal" class="programlisting">systemctl restart mysqld  # RPM platforms
systemctl restart mysql   # Debian platforms</pre><p>
        For platforms that use systemd, the data directory is
        initialized if empty at server startup. This might be a problem
        if the data directory is a remote mount that has temporarily
        disappeared: The mount point would appear to be an empty data
        directory, which then would be initialized as a new data
        directory. To suppress this automatic initialization behavior,
        specify the following line in the
        <code class="filename">/etc/sysconfig/mysql</code> file (create the file
        if it does not exist):
</p><pre data-lang="ini" class="programlisting">NO_INIT=true</pre>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="systemd-multiple-mysql-instances"></a>Configuring Multiple MySQL Instances Using systemd</h4>

</div>

</div>

</div>
<p>
        This section describes how to configure systemd for multiple
        instances of MySQL.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Because systemd has the capability of managing multiple MySQL
          instances on platforms for which systemd support is installed,
          <a class="link" href="programs.html#mysqld-multi" title="4.3.4 mysqld_multi — Manage Multiple MySQL Servers"><span class="command"><strong>mysqld_multi</strong></span></a> and
          <span class="command"><strong>mysqld_multi.server</strong></span> are unnecessary and are
          not installed.
</p>
</div>
<p>
        To use multiple-instance capability, modify the
        <code class="filename">my.cnf</code> option file to include configuration
        of key options for each instance. These file locations are
        typical:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <code class="filename">/etc/my.cnf</code> or
            <code class="filename">/etc/mysql/my.cnf</code> (RPM platforms)
          </p></li><li class="listitem"><p>
            <code class="filename">/etc/mysql/mysql.conf.d/mysqld.cnf</code>
            (Debian platforms)
</p></li></ul>
</div>
<p>
        For example, to manage two instances named
        <code class="literal">replica01</code> and <code class="literal">replica02</code>,
        add something like this to the option file:
      </p><p>
        RPM platforms:
      </p><pre data-lang="ini" class="programlisting">[mysqld@replica01]
datadir=/var/lib/mysql-replica01
socket=/var/lib/mysql-replica01/mysql.sock
port=3307
log-error=/var/log/mysqld-replica01.log

[mysqld@replica02]
datadir=/var/lib/mysql-replica02
socket=/var/lib/mysql-replica02/mysql.sock
port=3308
log-error=/var/log/mysqld-replica02.log</pre><p>
        Debian platforms:
      </p><pre data-lang="ini" class="programlisting">[mysqld@replica01]
datadir=/var/lib/mysql-replica01
socket=/var/lib/mysql-replica01/mysql.sock
port=3307
log-error=/var/log/mysql/replica01.log

[mysqld@replica02]
datadir=/var/lib/mysql-replica02
socket=/var/lib/mysql-replica02/mysql.sock
port=3308
log-error=/var/log/mysql/replica02.log</pre><p>
        The replica names shown here use <code class="literal">@</code> as the
        delimiter because that is the only delimiter supported by
        systemd.
      </p><p>
        Instances then are managed by normal systemd commands, such as:
      </p><pre data-lang="terminal" class="programlisting">systemctl start mysqld@replica01
systemctl start mysqld@replica02</pre><p>
        To enable instances to run at boot time, do this:
      </p><pre data-lang="terminal" class="programlisting">systemctl enable mysqld@replica01
systemctl enable mysqld@replica02</pre><p>
        Use of wildcards is also supported. For example, this command
        displays the status of all replica instances:
      </p><pre data-lang="terminal" class="programlisting">systemctl status 'mysqld@replica*'</pre><p>
        For management of multiple MySQL instances on the same machine,
        systemd automatically uses a different unit file:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <code class="filename">mysqld@.service</code> rather than
            <code class="filename">mysqld.service</code> (RPM platforms)
          </p></li><li class="listitem"><p>
            <code class="filename">mysql@.service</code> rather than
            <code class="filename">mysql.service</code> (Debian platforms)
</p></li></ul>
</div>
<p>
        In the unit file, <code class="literal">%I</code> and
        <code class="literal">%i</code> reference the parameter passed in after
        the <code class="literal">@</code> marker and are used to manage the
        specific instance. For a command such as this:
      </p><pre data-lang="terminal" class="programlisting">systemctl start mysqld@replica01</pre><p>
        systemd starts the server using a command such as this:
      </p><pre data-lang="terminal" class="programlisting">mysqld --defaults-group-suffix=@%I ...</pre><p>
        The result is that the <code class="literal">[server]</code>,
        <code class="literal">[mysqld]</code>, and
        <code class="literal">[mysqld@replica01]</code> option groups are read and
        used for that instance of the service.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          On Debian platforms, AppArmor prevents the server from reading
          or writing <code class="filename">/var/lib/mysql-replica*</code>, or
          anything other than the default locations. To address this,
          you must customize or disable the profile in
          <code class="filename">/etc/apparmor.d/usr.sbin.mysqld</code>.
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          On Debian platforms, the packaging scripts for MySQL
          uninstallation cannot currently handle
          <code class="literal">mysqld@</code> instances. Before removing or
          upgrading the package, you must stop any extra instances
          manually first.
</p>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="mysqld-safe-to-systemd-migration"></a>Migrating from mysqld_safe to systemd</h4>

</div>

</div>

</div>
<p>
        Because <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> is not installed on
        platforms that use systemd to manage MySQL, options previously
        specified for that program (for example, in an
        <code class="literal">[mysqld_safe]</code> option group) must be specified
        another way:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Some <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> options are also
            understood by <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> and can be moved
            from the <code class="literal">[mysqld_safe]</code> option group to
            the <code class="literal">[mysqld]</code> group. This does
            <span class="emphasis"><em>not</em></span> include
            <a class="link" href="programs.html#option_mysqld_safe_pid-file"><code class="option">--pid-file</code></a>,
            <a class="link" href="programs.html#option_mysqld_safe_open-files-limit"><code class="option">--open-files-limit</code></a>, or
            <a class="link" href="programs.html#option_mysqld_safe_nice"><code class="option">--nice</code></a>. To specify those
            options, use the <code class="filename">override.conf</code> systemd
            file, described previously.
          </p></li><li class="listitem"><p>
            For some <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> options, there are
            alternative <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> procedures. For
            example, the <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> option for
            enabling <code class="literal">syslog</code> logging is
            <a class="link" href="programs.html#option_mysqld_safe_syslog"><code class="option">--syslog</code></a>, which is
            deprecated. To write error log output to the system log, use
            the instructions at <a class="xref" href="server-administration.html#error-log-syslog" title="5.4.2.7 Error Logging to the System Log">Section 5.4.2.7, “Error Logging to the System Log”</a>.
          </p></li><li class="listitem"><p>
            <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> options not understood by
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> can be specified in
            <code class="filename">override.conf</code> or environment variables.
            For example, with <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>, if the
            server should use a specific memory allocation library, this
            is specified using the
            <a class="link" href="programs.html#option_mysqld_safe_malloc-lib"><code class="option">--malloc-lib</code></a> option. For
            installations that manage the server with systemd, arrange
            to set the <code class="literal">LD_PRELOAD</code> environment
            variable instead, as described previously.
</p></li></ul>
</div>

</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="uln-installation"></a>2.6 Installing MySQL Using Unbreakable Linux Network (ULN)</h2>

</div>

</div>

</div>
<p>
    Linux supports a number of different solutions for installing MySQL,
    covered in <a class="xref" href="installing.html#linux-installation" title="2.5 Installing MySQL on Linux">Section 2.5, “Installing MySQL on Linux”</a>. One of the methods,
    covered in this section, is installing from Oracle's Unbreakable
    Linux Network (ULN). You can find information about Oracle Linux and
    ULN under <a class="ulink" href="http://linux.oracle.com/" target="_top">http://linux.oracle.com/</a>.
  </p><p>
    To use ULN, you need to obtain a ULN login and register the machine
    used for installation with ULN. This is described in detail in the
    <a class="ulink" href="https://linux.oracle.com/uln_faq.html" target="_top">ULN FAQ</a>.
    The page also describes how to install and update packages. The
    MySQL packages are in the <span class="quote">“<span class="quote">MySQL for Oracle Linux 6</span>”</span>,
    <span class="quote">“<span class="quote">MySQL for Oracle Linux 7</span>”</span>, and <span class="quote">“<span class="quote">MySQL for Oracle
    Linux 8</span>”</span> channels for your system architecture on ULN.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      <span class="quote">“<span class="quote">MySQL for Oracle Linux 8</span>”</span> is supported as of MySQL
      8.0.17.
</p>
</div>
<p>
    Once MySQL has been installed using ULN, you can find information on
    starting and stopping the server, and more, in
    <a class="link" href="installing.html#linux-installation-native" title="2.5.7 Installing MySQL on Linux from the Native Software Repositories">this section</a>,
    particularly under <a class="xref" href="installing.html#linux-installation-rpm" title="2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle">Section 2.5.4, “Installing MySQL on Linux Using RPM Packages from Oracle”</a>.
  </p><p>
    If you're updating an existing MySQL installation to an installation
    using ULN, the recommended procedure is to export your data using
    <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>, remove the existing installation,
    install MySQL from ULN, and load the exported data into your freshly
    installed MySQL.
  </p><p>
    If the existing MySQL installation you're upgrading from is from a
    previous release series (prior to MySQL 8.0), make sure
    to read the section on upgrading MySQL, <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a>.
</p>
</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="solaris-installation"></a>2.7 Installing MySQL on Solaris</h2>

</div>

</div>

</div>

<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#solaris-installation-pkg">2.7.1 Installing MySQL on Solaris Using a Solaris PKG</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444440800752"></a><a class="indexterm" name="idm46444440799296"></a><a class="indexterm" name="idm46444440797840"></a><a class="indexterm" name="idm46444440796352"></a><a class="indexterm" name="idm46444440795264"></a><a class="indexterm" name="idm46444440793776"></a><a class="indexterm" name="idm46444440792320"></a><a class="indexterm" name="idm46444440790832"></a><a class="indexterm" name="idm46444440789760"></a>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      MySQL 8.0 supports Solaris 11.4 and higher
</p>
</div>
<p>
    MySQL on Solaris is available in a number of different formats.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        For information on installing using the native Solaris PKG
        format, see <a class="xref" href="installing.html#solaris-installation-pkg" title="2.7.1 Installing MySQL on Solaris Using a Solaris PKG">Section 2.7.1, “Installing MySQL on Solaris Using a Solaris PKG”</a>.
      </p></li><li class="listitem"><p>
        To use a standard <code class="literal">tar</code> binary installation,
        use the notes provided in <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>.
        Check the notes and hints at the end of this section for Solaris
        specific notes that you may need before or after installation.
</p></li></ul>
</div>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
      The installation packages have a dependency on the Oracle
      Developer Studio 12.6 Runtime Libraries, which must be installed
      before you run the MySQL installation package. See the download
      options for Oracle Developer Studio
      <a class="ulink" href="http://www.oracle.com/technetwork/server-storage/developerstudio/downloads/index.html" target="_top">here</a>.
      The installation package enables you to install the runtime
      libraries only instead of the full Oracle Developer Studio; see
      instructions in
      <a class="ulink" href="https://docs.oracle.com/cd/E77782_01/html/E77785/gozsu.html" target="_top">Installing
      Only the Runtime Libraries on Oracle Solaris 11</a>.
</p>
</div>
<p>
    To obtain a binary MySQL distribution for Solaris in tarball or PKG
    format,
    <a class="ulink" href="https://dev.mysql.com/downloads/mysql/8.0.html" target="_top">https://dev.mysql.com/downloads/mysql/8.0.html</a>.
  </p><p>
    Additional notes to be aware of when installing and using MySQL on
    Solaris:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        If you want to use MySQL with the <code class="literal">mysql</code> user
        and group, use the <span class="command"><strong>groupadd</strong></span> and
        <span class="command"><strong>useradd</strong></span> commands:
      </p><pre data-lang="terminal" class="programlisting">groupadd mysql
useradd -g mysql -s /bin/false mysql</pre></li><li class="listitem"><p>
        If you install MySQL using a binary tarball distribution on
        Solaris, because the Solaris <span class="command"><strong>tar</strong></span> cannot
        handle long file names, use GNU <span class="command"><strong>tar</strong></span>
        (<span class="command"><strong>gtar</strong></span>) to unpack the distribution. If you do
        not have GNU <span class="command"><strong>tar</strong></span> on your system, install it
        with the following command:
      </p><pre data-lang="terminal" class="programlisting">pkg install archiver/gnu-tar</pre></li><li class="listitem"><p>
        You should mount any file systems on which you intend to store
        <code class="literal">InnoDB</code> files with the
        <code class="literal">forcedirectio</code> option. (By default mounting is
        done without this option.) Failing to do so will cause a
        significant drop in performance when using the
        <code class="literal">InnoDB</code> storage engine on this platform.
      </p></li><li class="listitem"><p>
        If you would like MySQL to start automatically, you can copy
        <code class="filename">support-files/mysql.server</code> to
        <code class="filename">/etc/init.d</code> and create a symbolic link to
        it named <code class="filename">/etc/rc3.d/S99mysql.server</code>.
      </p></li><li class="listitem"><p>
        If too many processes try to connect very rapidly to
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>, you should see this error in the
        MySQL log:
      </p><pre data-lang="simple" class="programlisting">Error in accept: Protocol error</pre><p>
        You might try starting the server with the
        <a class="link" href="server-administration.html#sysvar_back_log"><code class="option">--back_log=50</code></a> option as a
        workaround for this.
      </p></li><li class="listitem"><p>
        To configure the generation of core files on Solaris you should
        use the <span class="command"><strong>coreadm</strong></span> command. Because of the
        security implications of generating a core on a
        <code class="literal">setuid()</code> application, by default, Solaris
        does not support core files on <code class="literal">setuid()</code>
        programs. However, you can modify this behavior using
        <span class="command"><strong>coreadm</strong></span>. If you enable
        <code class="literal">setuid()</code> core files for the current user,
        they will be generated using the mode 600 and owned by the
        superuser.
</p></li></ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="solaris-installation-pkg"></a>2.7.1 Installing MySQL on Solaris Using a Solaris PKG</h3>

</div>

</div>

</div>
<p>
      You can install MySQL on Solaris using a binary package of the
      native Solaris PKG format instead of the binary tarball
      distribution.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
        The installation package has a dependency on the Oracle
        Developer Studio 12.6 Runtime Libraries, which must be installed
        before you run the MySQL installation package. See the download
        options for Oracle Developer Studio
        <a class="ulink" href="http://www.oracle.com/technetwork/server-storage/developerstudio/downloads/index.html" target="_top">here</a>.
        The installation package enables you to install the runtime
        libraries only instead of the full Oracle Developer Studio; see
        instructions in
        <a class="ulink" href="https://docs.oracle.com/cd/E77782_01/html/E77785/gozsu.html" target="_top">Installing
        Only the Runtime Libraries on Oracle Solaris 11</a>.
</p>
</div>
<p>
      To use this package, download the corresponding
      <code class="filename">mysql-VERSION-solaris11-PLATFORM.pkg.gz</code> file,
      then uncompress it. For example:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gunzip mysql-<em class="replaceable"><code>8.0.22</code></em>-solaris11-x86_64.pkg.gz</code></strong>
</pre><p>
      To install a new package, use <span class="command"><strong>pkgadd</strong></span> and follow
      the onscreen prompts. You must have root privileges to perform
      this operation:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>pkgadd -d mysql-<em class="replaceable"><code>8.0.22</code></em>-solaris11-x86_64.pkg</code></strong>

The following packages are available:
  1  mysql     MySQL Community Server (GPL)
               (i86pc) 8.0.22

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
</pre><p>
      The PKG installer installs all of the files and tools needed, and
      then initializes your database if one does not exist. To complete
      the installation, you should set the root password for MySQL as
      provided in the instructions at the end of the installation.
      Alternatively, you can run the
      <a class="link" href="programs.html#mysql-secure-installation" title="4.4.2 mysql_secure_installation — Improve MySQL Installation Security"><span class="command"><strong>mysql_secure_installation</strong></span></a> script that comes
      with the installation.
    </p><p>
      By default, the PKG package installs MySQL under the root path
      <code class="filename">/opt/mysql</code>. You can change only the
      installation root path when using <span class="command"><strong>pkgadd</strong></span>, which
      can be used to install MySQL in a different Solaris zone. If you
      need to install in a specific directory, use a binary
      <span class="command"><strong>tar</strong></span> file distribution.
    </p><p>
      The <code class="literal">pkg</code> installer copies a suitable startup
      script for MySQL into <code class="literal">/etc/init.d/mysql</code>. To
      enable MySQL to startup and shutdown automatically, you should
      create a link between this file and the init script directories.
      For example, to ensure safe startup and shutdown of MySQL you
      could use the following commands to add the right links:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>ln /etc/init.d/mysql /etc/rc3.d/S91mysql</code></strong>
shell&gt; <strong class="userinput"><code>ln /etc/init.d/mysql /etc/rc0.d/K02mysql</code></strong>
</pre><p>
      To remove MySQL, the installed package name is
      <code class="literal">mysql</code>. You can use this in combination with the
      <span class="command"><strong>pkgrm</strong></span> command to remove the installation.
    </p><p>
      To upgrade when using the Solaris package file format, you must
      remove the existing installation before installing the updated
      package. Removal of the package does not delete the existing
      database information, only the server, binaries and support files.
      The typical upgrade sequence is therefore:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysqladmin shutdown</code></strong>
shell&gt; <strong class="userinput"><code>pkgrm mysql</code></strong>
shell&gt; <strong class="userinput"><code>pkgadd -d mysql-<em class="replaceable"><code>8.0.22</code></em>-solaris11-x86_64.pkg</code></strong>
shell&gt; <strong class="userinput"><code>mysqld_safe &amp;</code></strong>
shell&gt; <strong class="userinput"><code>mysql_upgrade</code></strong>   # prior to MySQL 8.0.16 only
</pre><p>
      You should check the notes in <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a> before
      performing any upgrade.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="freebsd-installation"></a>2.8 Installing MySQL on FreeBSD</h2>

</div>

</div>

</div>
<p>
    This section provides information about installing MySQL on variants
    of FreeBSD Unix.
  </p><p>
    You can install MySQL on FreeBSD by using the binary distribution
    provided by Oracle. For more information, see
    <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>.
  </p><p>
    The easiest (and preferred) way to install MySQL is to use the
    <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql-server</strong></span></a> and <code class="literal">mysql-client</code>
    ports available at <a class="ulink" href="http://www.freebsd.org/" target="_top">http://www.freebsd.org/</a>. Using
    these ports gives you the following benefits:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        A working MySQL with all optimizations enabled that are known to
        work on your version of FreeBSD.
      </p></li><li class="listitem"><p>
        Automatic configuration and build.
      </p></li><li class="listitem"><p>
        Startup scripts installed in
        <code class="filename">/usr/local/etc/rc.d</code>.
      </p></li><li class="listitem"><p>
        The ability to use <code class="literal">pkg_info -L</code> to see which
        files are installed.
      </p></li><li class="listitem"><p>
        The ability to use <code class="literal">pkg_delete</code> to remove MySQL
        if you no longer want it on your machine.
</p></li></ul>
</div>
<p>
    The MySQL build process requires GNU make (<span class="command"><strong>gmake</strong></span>)
    to work. If GNU <span class="command"><strong>make</strong></span> is not available, you must
    install it first before compiling MySQL.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      Prerequisite libraries as per <span class="command"><strong>ldd mysqld</strong></span>:
      libthr, libcrypt, libkrb5, libm, librt, libexecinfo, libunwind,
      and libssl.
</p>
</div>
<p>
    To install using the ports system:
  </p><pre data-lang="terminal" class="programlisting"># cd /usr/ports/databases/mysql80-server
# make
...
# cd /usr/ports/databases/mysql80-client
# make
...</pre><p>
    The standard port installation places the server into
    <code class="filename">/usr/local/libexec/mysqld</code>, with the startup
    script for the MySQL server placed in
    <code class="filename">/usr/local/etc/rc.d/mysql-server</code>.
  </p><p>
    Some additional notes on the BSD implementation:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        To remove MySQL after installation using the ports system:
      </p><pre data-lang="terminal" class="programlisting"># cd /usr/ports/databases/mysql80-server
# make deinstall
...
# cd /usr/ports/databases/mysql80-client
# make deinstall
...</pre></li><li class="listitem"><p>
        If you get problems with the current date in MySQL, setting the
        <code class="literal">TZ</code> variable should help. See
        <a class="xref" href="programs.html#environment-variables" title="4.9 Environment Variables">Section 4.9, “Environment Variables”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="source-installation"></a>2.9 Installing MySQL from Source</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#source-installation-methods">2.9.1 Source Installation Methods</a></span></dt><dt><span class="section"><a href="installing.html#source-installation-prerequisites">2.9.2 Source Installation Prerequisites</a></span></dt><dt><span class="section"><a href="installing.html#source-installation-layout">2.9.3 MySQL Layout for Source Installation</a></span></dt><dt><span class="section"><a href="installing.html#installing-source-distribution">2.9.4 Installing MySQL Using a Standard Source Distribution</a></span></dt><dt><span class="section"><a href="installing.html#installing-development-tree">2.9.5 Installing MySQL Using a Development Source Tree</a></span></dt><dt><span class="section"><a href="installing.html#source-ssl-library-configuration">2.9.6 Configuring SSL Library Support</a></span></dt><dt><span class="section"><a href="installing.html#source-configuration-options">2.9.7 MySQL Source-Configuration Options</a></span></dt><dt><span class="section"><a href="installing.html#compilation-problems">2.9.8 Dealing with Problems Compiling MySQL</a></span></dt><dt><span class="section"><a href="installing.html#source-configuration-third-party">2.9.9 MySQL Configuration and Third-Party Tools</a></span></dt><dt><span class="section"><a href="installing.html#source-installation-doxygen">2.9.10 Generating MySQL Doxygen Documentation Content</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444440696896"></a><a class="indexterm" name="idm46444440695440"></a><a class="indexterm" name="idm46444440693952"></a><p>
    Building MySQL from the source code enables you to customize build
    parameters, compiler optimizations, and installation location. For a
    list of systems on which MySQL is known to run, see
    <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_top">https://www.mysql.com/support/supportedplatforms/database.html</a>.
  </p><p>
    Before you proceed with an installation from source, check whether
    Oracle produces a precompiled binary distribution for your platform
    and whether it works for you. We put a great deal of effort into
    ensuring that our binaries are built with the best possible options
    for optimal performance. Instructions for installing binary
    distributions are available in
    <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
      Building MySQL with nonstandard options may lead to reduced
      functionality, performance, or security.
</p>
</div>
<p>
    The MySQL source code contains internal documentation written using
    Doxygen. The generated Doxygen content is available at
    <a class="ulink" href="https://dev.mysql.com/doc/index-other.html" target="_top">https://dev.mysql.com/doc/index-other.html</a>. It is also possible to
    generate this content locally from a MySQL source distribution using
    the instructions at <a class="xref" href="installing.html#source-installation-doxygen" title="2.9.10 Generating MySQL Doxygen Documentation Content">Section 2.9.10, “Generating MySQL Doxygen Documentation Content”</a>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-installation-methods"></a>2.9.1 Source Installation Methods</h3>
</div>
</div>
</div>
<p>
      There are two methods for installing MySQL from source:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Use a standard MySQL source distribution. To obtain a standard
          distribution, see <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>. For
          instructions on building from a standard distribution, see
          <a class="xref" href="installing.html#installing-source-distribution" title="2.9.4 Installing MySQL Using a Standard Source Distribution">Section 2.9.4, “Installing MySQL Using a Standard Source Distribution”</a>.
        </p><p>
          Standard distributions are available as compressed
          <span class="command"><strong>tar</strong></span> files, Zip archives, or RPM packages.
          Distribution files have names of the form
          <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>.tar.gz</code>,
          <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>.zip</code>,
          or
          <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em>.rpm</code>,
          where <em class="replaceable"><code>VERSION</code></em> is a number like
          <code class="literal">8.0.22</code>. File names for source
          distributions can be distinguished from those for precompiled
          binary distributions in that source distribution names are
          generic and include no platform name, whereas binary
          distribution names include a platform name indicating the type
          of system for which the distribution is intended (for example,
          <code class="literal">pc-linux-i686</code> or
          <code class="literal">winx64</code>).
        </p></li><li class="listitem"><p>
          Use a MySQL development tree. For information on building from
          one of the development trees, see
          <a class="xref" href="installing.html#installing-development-tree" title="2.9.5 Installing MySQL Using a Development Source Tree">Section 2.9.5, “Installing MySQL Using a Development Source Tree”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-installation-prerequisites"></a>2.9.2 Source Installation Prerequisites</h3>

</div>

</div>

</div>
<p>
      Installation of MySQL from source requires several development
      tools. Some of these tools are needed no matter whether you use a
      standard source distribution or a development source tree. Other
      tool requirements depend on which installation method you use.
    </p><p>
      To install MySQL from source, the following system requirements
      must be satisfied, regardless of installation method:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <span class="command"><strong>CMake</strong></span>, which is used as the build framework
          on all platforms. <span class="command"><strong>CMake</strong></span> can be downloaded
          from <a class="ulink" href="http://www.cmake.org" target="_top">http://www.cmake.org</a>.
        </p></li><li class="listitem"><p>
          A good <span class="command"><strong>make</strong></span> program. Although some
          platforms come with their own <span class="command"><strong>make</strong></span>
          implementations, it is highly recommended that you use GNU
          <span class="command"><strong>make</strong></span> 3.75 or higher. It may already be
          available on your system as <span class="command"><strong>gmake</strong></span>. GNU
          <span class="command"><strong>make</strong></span> is available from
          <a class="ulink" href="http://www.gnu.org/software/make/" target="_top">http://www.gnu.org/software/make/</a>.
        </p></li><li class="listitem"><p>
          MySQL 8.0 source code permits use of C++14
          features. To enable a good level of C++14 support across all
          supported platforms, the following minimum compiler versions
          apply:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              GCC 5.3 (Linux)
            </p></li><li class="listitem"><p>
              Clang 4.0 (FreeBSD)
            </p></li><li class="listitem"><p>
              XCode 9 (macOS)
            </p></li><li class="listitem"><p>
              Developer Studio 12.6 (Solaris)
            </p></li><li class="listitem"><p>
              Visual Studio 2017 (Windows)
</p></li></ul>
</div>
</li><li class="listitem"><p>
          The MySQL C API requires a C++ or C99 compiler to compile.
        </p></li><li class="listitem"><p>
          An SSL library is required for support of encrypted
          connections, entropy for random number generation, and other
          encryption-related operations. By default, the build uses the
          OpenSSL library installed on the host system. To specify the
          library explicitly, use the
          <a class="link" href="installing.html#option_cmake_with_ssl"><code class="option">WITH_SSL</code></a> option when you invoke
          <span class="command"><strong>CMake</strong></span>. For additional information, see
          <a class="xref" href="installing.html#source-ssl-library-configuration" title="2.9.6 Configuring SSL Library Support">Section 2.9.6, “Configuring SSL Library Support”</a>.
        </p></li><li class="listitem"><p>
          The Boost C++ libraries are required to build MySQL (but not
          to use it). MySQL compilation requires a particular Boost
          version. Typically, that is the current Boost version, but if
          a specific MySQL source distribution requires a different
          version, the configuration process will stop with a message
          indicating the Boost version that it requires. To obtain Boost
          and its installation instructions, visit
          <a class="ulink" href="http://www.boost.org" target="_top">the official site</a>.
          After Boost is installed, tell the build system where the
          Boost files are located by defining the
          <a class="link" href="installing.html#option_cmake_with_boost"><code class="option">WITH_BOOST</code></a> option when you
          invoke <span class="command"><strong>CMake</strong></span>. For example:
        </p><pre data-lang="terminal" class="programlisting">cmake . -DWITH_BOOST=/usr/local/boost_<em class="replaceable"><code>version_number</code></em>
</pre><p>
          Adjust the path as necessary to match your installation.
        </p></li><li class="listitem"><p>
          The
          <a class="ulink" href="https://www.gnu.org/software/ncurses/ncurses.html" target="_top">ncurses</a>
          library.
        </p></li><li class="listitem"><p>
          Sufficient free memory. If you encounter problems such as
          <span class="quote">“<span class="quote">internal compiler error</span>”</span> when compiling large
          source files, it may be that you have too little memory. If
          compiling on a virtual machine, try increasing the memory
          allocation.
        </p></li><li class="listitem"><p>
          Perl is needed if you intend to run test scripts. Most
          Unix-like systems include Perl. On Windows, you can use a
          version such as ActiveState Perl.
</p></li></ul>
</div>
<p>
      To install MySQL from a standard source distribution, one of the
      following tools is required to unpack the distribution file:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          For a <code class="filename">.tar.gz</code> compressed
          <span class="command"><strong>tar</strong></span> file: GNU <code class="literal">gunzip</code> to
          uncompress the distribution and a reasonable
          <span class="command"><strong>tar</strong></span> to unpack it. If your
          <span class="command"><strong>tar</strong></span> program supports the
          <code class="literal">z</code> option, it can both uncompress and unpack
          the file.
        </p><p>
          GNU <span class="command"><strong>tar</strong></span> is known to work. The standard
          <span class="command"><strong>tar</strong></span> provided with some operating systems is
          not able to unpack the long file names in the MySQL
          distribution. You should download and install GNU
          <span class="command"><strong>tar</strong></span>, or if available, use a preinstalled
          version of GNU tar. Usually this is available as
          <span class="command"><strong>gnutar</strong></span>, <span class="command"><strong>gtar</strong></span>, or as
          <span class="command"><strong>tar</strong></span> within a GNU or Free Software
          directory, such as <code class="filename">/usr/sfw/bin</code> or
          <code class="filename">/usr/local/bin</code>. GNU
          <span class="command"><strong>tar</strong></span> is available from
          <a class="ulink" href="http://www.gnu.org/software/tar/" target="_top">http://www.gnu.org/software/tar/</a>.
        </p></li><li class="listitem"><p>
          For a <code class="filename">.zip</code> Zip archive:
          <span class="command"><strong>WinZip</strong></span> or another tool that can read
          <code class="filename">.zip</code> files.
        </p></li><li class="listitem"><p>
          For an <code class="filename">.rpm</code> RPM package: The
          <span class="command"><strong>rpmbuild</strong></span> program used to build the
          distribution unpacks it.
</p></li></ul>
</div>
<p>
      To install MySQL from a development source tree, the following
      additional tools are required:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The Git revision control system is required to obtain the
          development source code. The
          <a class="ulink" href="https://help.github.com/" target="_top">GitHub Help</a>
          provides instructions for downloading and installing Git on
          different platforms. MySQL officially joined GitHub in
          September, 2014. For more information about MySQL's move to
          GitHub, refer to the announcement on the MySQL Release
          Engineering blog:
          <a class="ulink" href="http://mysqlrelease.com/2014/09/mysql-on-github/" target="_top">MySQL
          on GitHub</a>
        </p></li><li class="listitem"><p>
          <span class="command"><strong>bison</strong></span> 2.1 or higher, available from
          <a class="ulink" href="http://www.gnu.org/software/bison/" target="_top">http://www.gnu.org/software/bison/</a>. (Version 1
          is no longer supported.) Use the latest version of
          <span class="command"><strong>bison</strong></span> where possible; if you experience
          problems, upgrade to a later version, rather than revert to an
          earlier one.
        </p><p>
          <span class="command"><strong>bison</strong></span> is available from
          <a class="ulink" href="http://www.gnu.org/software/bison/" target="_top">http://www.gnu.org/software/bison/</a>.
          <code class="literal">bison</code> for Windows can be downloaded from
          <a class="ulink" href="http://gnuwin32.sourceforge.net/packages/bison.htm" target="_top">http://gnuwin32.sourceforge.net/packages/bison.htm</a>.
          Download the package labeled <span class="quote">“<span class="quote">Complete package,
          excluding sources</span>”</span>. On Windows, the default location
          for <span class="command"><strong>bison</strong></span> is the <code class="filename">C:\Program
          Files\GnuWin32</code> directory. Some utilities may fail
          to find <span class="command"><strong>bison</strong></span> because of the space in the
          directory name. Also, Visual Studio may simply hang if there
          are spaces in the path. You can resolve these problems by
          installing into a directory that does not contain a space (for
          example <code class="filename">C:\GnuWin32</code>).
        </p></li><li class="listitem"><p>
          On Solaris Express, <span class="command"><strong>m4</strong></span> must be installed in
          addition to <span class="command"><strong>bison</strong></span>. <span class="command"><strong>m4</strong></span> is
          available from <a class="ulink" href="http://www.gnu.org/software/m4/" target="_top">http://www.gnu.org/software/m4/</a>.
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
        If you have to install any programs, modify your
        <code class="literal">PATH</code> environment variable to include any
        directories in which the programs are located. See
        <a class="xref" href="programs.html#setting-environment-variables" title="4.2.7 Setting Environment Variables">Section 4.2.7, “Setting Environment Variables”</a>.
</p>
</div>
<p>
      If you run into problems and need to file a bug report, please use
      the instructions in <a class="xref" href="introduction.html#bug-reports" title="1.7 How to Report Bugs or Problems">Section 1.7, “How to Report Bugs or Problems”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-installation-layout"></a>2.9.3 MySQL Layout for Source Installation</h3>

</div>

</div>

</div>
<p>
      By default, when you install MySQL after compiling it from source,
      the installation step installs files under
      <code class="filename">/usr/local/mysql</code>. The component locations
      under the installation directory are the same as for binary
      distributions. See <a class="xref" href="installing.html#binary-installation-layout" title="Table 2.3 MySQL Installation Layout for Generic Unix/Linux Binary Package">Table 2.3, “MySQL Installation Layout for Generic Unix/Linux Binary Package”</a>,
      and <a class="xref" href="installing.html#windows-installation-layout" title="2.3.1 MySQL Installation Layout on Microsoft Windows">Section 2.3.1, “MySQL Installation Layout on Microsoft Windows”</a>. To configure
      installation locations different from the defaults, use the
      options described at
      <a class="xref" href="installing.html#source-configuration-options" title="2.9.7 MySQL Source-Configuration Options">Section 2.9.7, “MySQL Source-Configuration Options”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="installing-source-distribution"></a>2.9.4 Installing MySQL Using a Standard Source Distribution</h3>

</div>

</div>

</div>
<p>
      To install MySQL from a standard source distribution:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Verify that your system satisfies the tool requirements listed
          at <a class="xref" href="installing.html#source-installation-prerequisites" title="2.9.2 Source Installation Prerequisites">Section 2.9.2, “Source Installation Prerequisites”</a>.
        </p></li><li class="listitem"><p>
          Obtain a distribution file using the instructions in
          <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>.
        </p></li><li class="listitem"><p>
          Configure, build, and install the distribution using the
          instructions in this section.
        </p></li><li class="listitem"><p>
          Perform postinstallation procedures using the instructions in
          <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>.
</p></li></ol>
</div>
<p>
      MySQL uses <span class="command"><strong>CMake</strong></span> as the build framework on all
      platforms. The instructions given here should enable you to
      produce a working installation. For additional information on
      using <span class="command"><strong>CMake</strong></span> to build MySQL, see
      <a class="ulink" href="https://dev.mysql.com/doc/internals/en/cmake.html" target="_top">How to Build MySQL
      Server with CMake</a>.
    </p><p>
      If you start from a source RPM, use the following command to make
      a binary RPM that you can install. If you do not have
      <span class="command"><strong>rpmbuild</strong></span>, use <span class="command"><strong>rpm</strong></span> instead.
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>rpmbuild --rebuild --clean MySQL-<em class="replaceable"><code>VERSION</code></em>.src.rpm</code></strong>
</pre><p>
      The result is one or more binary RPM packages that you install as
      indicated in <a class="xref" href="installing.html#linux-installation-rpm" title="2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle">Section 2.5.4, “Installing MySQL on Linux Using RPM Packages from Oracle”</a>.
    </p><p>
      The sequence for installation from a compressed
      <span class="command"><strong>tar</strong></span> file or Zip archive source distribution is
      similar to the process for installing from a generic binary
      distribution (see <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>), except
      that it is used on all platforms and includes steps to configure
      and compile the distribution. For example, with a compressed
      <span class="command"><strong>tar</strong></span> file source distribution on Unix, the basic
      installation command sequence looks like this:
    </p><pre data-lang="terminal" class="programlisting"># Preconfiguration setup
shell&gt; <strong class="userinput"><code>groupadd mysql</code></strong>
shell&gt; <strong class="userinput"><code>useradd -r -g mysql -s /bin/false mysql</code></strong>
# Beginning of source-build specific instructions
shell&gt; <strong class="userinput"><code>tar zxvf mysql-<em class="replaceable"><code>VERSION</code></em>.tar.gz</code></strong>
shell&gt; <strong class="userinput"><code>cd mysql-<em class="replaceable"><code>VERSION</code></em></code></strong>
shell&gt; <strong class="userinput"><code>mkdir bld</code></strong>
shell&gt; <strong class="userinput"><code>cd bld</code></strong>
shell&gt; <strong class="userinput"><code>cmake ..</code></strong>
shell&gt; <strong class="userinput"><code>make</code></strong>
shell&gt; <strong class="userinput"><code>make install</code></strong>
# End of source-build specific instructions
# Postinstallation setup
shell&gt; <strong class="userinput"><code>cd /usr/local/mysql</code></strong>
shell&gt; <strong class="userinput"><code>mkdir mysql-files</code></strong>
shell&gt; <strong class="userinput"><code>chown mysql:mysql mysql-files</code></strong>
shell&gt; <strong class="userinput"><code>chmod 750 mysql-files</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysqld --initialize --user=mysql</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysql_ssl_rsa_setup</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysqld_safe --user=mysql &amp;</code></strong>
# Next command is optional
shell&gt; <strong class="userinput"><code>cp support-files/mysql.server /etc/init.d/mysql.server</code></strong>
</pre><p>
      A more detailed version of the source-build specific instructions
      is shown following.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        The procedure shown here does not set up any passwords for MySQL
        accounts. After following the procedure, proceed to
        <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>, for postinstallation setup
        and testing.
</p>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#installing-source-distribution-preconfiguration" title="Perform Preconfiguration Setup">Perform Preconfiguration Setup</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#installing-source-distribution-obtain-distribution" title="Obtain and Unpack the Distribution">Obtain and Unpack the Distribution</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#installing-source-distribution-configure-distribution" title="Configure the Distribution">Configure the Distribution</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#installing-source-distribution-build-distribution" title="Build the Distribution">Build the Distribution</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#installing-source-distribution-install-distribution" title="Install the Distribution">Install the Distribution</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#installing-source-distribution-postinstallation" title="Perform Postinstallation Setup">Perform Postinstallation Setup</a></p></li></ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-source-distribution-preconfiguration"></a>Perform Preconfiguration Setup</h4>

</div>

</div>

</div>
<p>
        On Unix, set up the <code class="literal">mysql</code> user and group that
        will be used to run and execute the MySQL server and own the
        database directory. For details, see
        <a class="xref" href="installing.html#binary-installation-createsysuser" title="Create a mysql User and Group">Create a mysql User and Group</a>. Then
        perform the following steps as the <code class="literal">mysql</code>
        user, except as noted.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-source-distribution-obtain-distribution"></a>Obtain and Unpack the Distribution</h4>

</div>

</div>

</div>
<p>
        Pick the directory under which you want to unpack the
        distribution and change location into it.
      </p><p>
        Obtain a distribution file using the instructions in
        <a class="xref" href="installing.html#getting-mysql" title="2.1.2 How to Get MySQL">Section 2.1.2, “How to Get MySQL”</a>.
      </p><p>
        Unpack the distribution into the current directory:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            To unpack a compressed <span class="command"><strong>tar</strong></span> file,
            <span class="command"><strong>tar</strong></span> can uncompress and unpack the
            distribution if it has <code class="literal">z</code> option support:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>tar zxvf mysql-<em class="replaceable"><code>VERSION</code></em>.tar.gz</code></strong>
</pre><p>
            If your <span class="command"><strong>tar</strong></span> does not have
            <code class="literal">z</code> option support, use
            <span class="command"><strong>gunzip</strong></span> to unpack the distribution and
            <span class="command"><strong>tar</strong></span> to unpack it:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gunzip &lt; mysql-<em class="replaceable"><code>VERSION</code></em>.tar.gz | tar xvf -</code></strong>
</pre><p>
            Alternatively, <span class="command"><strong>CMake</strong></span> can uncompress and
            unpack the distribution:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cmake -E tar zxvf mysql-<em class="replaceable"><code>VERSION</code></em>.tar.gz</code></strong>
</pre></li><li class="listitem"><p>
            To unpack a Zip archive, use <span class="command"><strong>WinZip</strong></span> or
            another tool that can read <code class="filename">.zip</code> files.
</p></li></ul>
</div>
<p>
        Unpacking the distribution file creates a directory named
        <code class="filename">mysql-<em class="replaceable"><code>VERSION</code></em></code>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-source-distribution-configure-distribution"></a>Configure the Distribution</h4>

</div>

</div>

</div>
<p>
        Change location into the top-level directory of the unpacked
        distribution:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cd mysql-<em class="replaceable"><code>VERSION</code></em></code></strong>
</pre><p>
        Build outside of the source tree to keep the tree clean. If the
        top-level source directory is named
        <code class="filename">mysql-src</code> under your current working
        directory, you can build in a directory named
        <code class="filename">bld</code> at the same level. Create the directory
        and go there:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mkdir bld</code></strong>
shell&gt; <strong class="userinput"><code>cd bld</code></strong>
</pre><p>
        Configure the build directory. The minimum configuration command
        includes no options to override configuration defaults:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cmake ../mysql-src</code></strong>
</pre><p>
        The build directory needs not be outside the source tree.

        

        For example, you can build in a directory named
        <code class="filename">bld</code> under the top-level source tree. To do
        this, starting with <code class="filename">mysql-src</code> as your
        current working directory, create the directory
        <code class="filename">bld</code> and then go there:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mkdir bld</code></strong>
shell&gt; <strong class="userinput"><code>cd bld</code></strong>
</pre><p>
        Configure the build directory. The minimum configuration command
        includes no options to override configuration defaults:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cmake ..</code></strong>
</pre><p>
        If you have multiple source trees at the same level (for
        example, to build multiple versions of MySQL), the second
        strategy can be advantageous. The first strategy places all
        build directories at the same level, which requires that you
        choose a unique name for each. With the second strategy, you can
        use the same name for the build directory within each source
        tree. The following instructions assume this second strategy.
      </p><p>
        On Windows, specify the development environment. For example,
        the following commands configure MySQL for 32-bit or 64-bit
        builds, respectively:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cmake .. -G "Visual Studio 12 2013"</code></strong>
shell&gt; <strong class="userinput"><code>cmake .. -G "Visual Studio 12 2013 Win64"</code></strong>
</pre><p>
        On macOS, to use the Xcode IDE:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cmake .. -G Xcode</code></strong>
</pre><p>
        When you run <span class="command"><strong>cmake</strong></span>, you might want to add
        options to the command line. Here are some examples:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <a class="link" href="installing.html#option_cmake_build_config"><code class="option">-DBUILD_CONFIG=mysql_release</code></a>:
            Configure the source with the same build options used by
            Oracle to produce binary distributions for official MySQL
            releases.
          </p></li><li class="listitem"><p>
            <a class="link" href="installing.html#option_cmake_cmake_install_prefix"><code class="option">-DCMAKE_INSTALL_PREFIX=<em class="replaceable"><code>dir_name</code></em></code></a>:
            Configure the distribution for installation under a
            particular location.
          </p></li><li class="listitem"><p>
            <a class="link" href="installing.html#option_cmake_cpack_monolithic_install"><code class="option">-DCPACK_MONOLITHIC_INSTALL=1</code></a>:
            Cause <span class="command"><strong>make package</strong></span> to generate a single
            installation file rather than multiple files.
          </p></li><li class="listitem"><p>
            <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">-DWITH_DEBUG=1</code></a>: Build the
            distribution with debugging support.
</p></li></ul>
</div>
<p>
        For a more extensive list of options, see
        <a class="xref" href="installing.html#source-configuration-options" title="2.9.7 MySQL Source-Configuration Options">Section 2.9.7, “MySQL Source-Configuration Options”</a>.
      </p><p>
        To list the configuration options, use one of the following
        commands:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cmake .. -L</code></strong>   # overview
shell&gt; <strong class="userinput"><code>cmake .. -LH</code></strong>  # overview with help text
shell&gt; <strong class="userinput"><code>cmake .. -LAH</code></strong> # all params with help text
shell&gt; <strong class="userinput"><code>ccmake ..</code></strong>     # interactive display
</pre><p>
        If <span class="command"><strong>CMake</strong></span> fails, you might need to reconfigure
        by running it again with different options. If you do
        reconfigure, take note of the following:
</p><a class="indexterm" name="idm46444440488016"></a><a class="indexterm" name="idm46444440486928"></a>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If <span class="command"><strong>CMake</strong></span> is run after it has previously
            been run, it may use information that was gathered during
            its previous invocation. This information is stored in
            <code class="filename">CMakeCache.txt</code>. When
            <span class="command"><strong>CMake</strong></span> starts, it looks for that file and
            reads its contents if it exists, on the assumption that the
            information is still correct. That assumption is invalid
            when you reconfigure.
          </p></li><li class="listitem"><p>
            Each time you run <span class="command"><strong>CMake</strong></span>, you must run
            <span class="command"><strong>make</strong></span> again to recompile. However, you may
            want to remove old object files from previous builds first
            because they were compiled using different configuration
            options.
</p></li></ul>
</div>
<p>
        To prevent old object files or configuration information from
        being used, run these commands in the build direcotry on Unix
        before re-running <span class="command"><strong>CMake</strong></span>:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>make clean</code></strong>
shell&gt; <strong class="userinput"><code>rm CMakeCache.txt</code></strong>
</pre><p>
        Or, on Windows:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>devenv MySQL.sln /clean</code></strong>
shell&gt; <strong class="userinput"><code>del CMakeCache.txt</code></strong>
</pre><p>
        Before asking on the
        <a class="ulink" href="https://mysqlcommunity.slack.com/" target="_top">MySQL Community
        Slack</a>, check the files in the
        <code class="filename">CMakeFiles</code> directory for useful information
        about the failure. To file a bug report, please use the
        instructions in <a class="xref" href="introduction.html#bug-reports" title="1.7 How to Report Bugs or Problems">Section 1.7, “How to Report Bugs or Problems”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-source-distribution-build-distribution"></a>Build the Distribution</h4>

</div>

</div>

</div>
<p>
        On Unix:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>make</code></strong>
shell&gt; <strong class="userinput"><code>make VERBOSE=1</code></strong>
</pre><p>
        The second command sets <code class="literal">VERBOSE</code> to show the
        commands for each compiled source.
      </p><p>
        Use <span class="command"><strong>gmake</strong></span> instead on systems where you are
        using GNU <span class="command"><strong>make</strong></span> and it has been installed as
        <span class="command"><strong>gmake</strong></span>.
      </p><p>
        On Windows:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>devenv MySQL.sln /build RelWithDebInfo</code></strong>
</pre><p>
        If you have gotten to the compilation stage, but the
        distribution does not build, see
        <a class="xref" href="installing.html#compilation-problems" title="2.9.8 Dealing with Problems Compiling MySQL">Section 2.9.8, “Dealing with Problems Compiling MySQL”</a>, for help. If that does
        not solve the problem, please enter it into our bugs database
        using the instructions given in <a class="xref" href="introduction.html#bug-reports" title="1.7 How to Report Bugs or Problems">Section 1.7, “How to Report Bugs or Problems”</a>.
        If you have installed the latest versions of the required tools,
        and they crash trying to process our configuration files, please
        report that also. However, if you get a <code class="literal">command not
        found</code> error or a similar problem for required tools,
        do not report it. Instead, make sure that all the required tools
        are installed and that your <code class="literal">PATH</code> variable is
        set correctly so that your shell can find them.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-source-distribution-install-distribution"></a>Install the Distribution</h4>

</div>

</div>

</div>
<p>
        On Unix:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>make install</code></strong>
</pre><p>
        This installs the files under the configured installation
        directory (by default, <code class="filename">/usr/local/mysql</code>).
        You might need to run the command as <code class="literal">root</code>.
      </p><p>
        To install in a specific directory, add a
        <code class="literal">DESTDIR</code> parameter to the command line:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>make install DESTDIR="/opt/mysql"</code></strong>
</pre><p>
        Alternatively, generate installation package files that you can
        install where you like:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>make package</code></strong>
</pre><p>
        This operation produces one or more <code class="filename">.tar.gz</code>
        files that can be installed like generic binary distribution
        packages. See <a class="xref" href="installing.html#binary-installation" title="2.2 Installing MySQL on Unix/Linux Using Generic Binaries">Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”</a>. If you run
        <span class="command"><strong>CMake</strong></span> with
        <a class="link" href="installing.html#option_cmake_cpack_monolithic_install"><code class="option">-DCPACK_MONOLITHIC_INSTALL=1</code></a>, the
        operation produces a single file. Otherwise, it produces
        multiple files.
      </p><p>
        On Windows, generate the data directory, then create a
        <code class="filename">.zip</code> archive installation package:
      </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>devenv MySQL.sln /build RelWithDebInfo /project initial_database</code></strong>
shell&gt; <strong class="userinput"><code>devenv MySQL.sln /build RelWithDebInfo /project package</code></strong>
</pre><p>
        You can install the resulting <code class="filename">.zip</code> archive
        where you like. See <a class="xref" href="installing.html#windows-install-archive" title="2.3.4 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive">Section 2.3.4, “Installing MySQL on Microsoft Windows Using a
      <code class="literal">noinstall</code> ZIP Archive”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-source-distribution-postinstallation"></a>Perform Postinstallation Setup</h4>

</div>

</div>

</div>
<p>
        The remainder of the installation process involves setting up
        the configuration file, creating the core databases, and
        starting the MySQL server. For instructions, see
        <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          The accounts that are listed in the MySQL grant tables
          initially have no passwords. After starting the server, you
          should set up passwords for them using the instructions in
          <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>.
</p>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="installing-development-tree"></a>2.9.5 Installing MySQL Using a Development Source Tree</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444440430944"></a><a class="indexterm" name="idm46444440429872"></a><p>
      This section describes how to install MySQL from the latest
      development source code, which is hosted on
      <a class="ulink" href="https://github.com/" target="_top">GitHub</a>. To obtain the
      MySQL Server source code from this repository hosting service, you
      can set up a local MySQL Git repository.
    </p><p>
      On <a class="ulink" href="https://github.com/" target="_top">GitHub</a>, MySQL Server
      and other MySQL projects are found on the
      <a class="ulink" href="https://github.com/mysql" target="_top">MySQL</a> page. The
      MySQL Server project is a single repository that contains branches
      for several MySQL series.
    </p><p>
      MySQL officially joined GitHub in September, 2014. For more
      information about MySQL's move to GitHub, refer to the
      announcement on the MySQL Release Engineering blog:
      <a class="ulink" href="http://mysqlrelease.com/2014/09/mysql-on-github/" target="_top">MySQL
      on GitHub</a>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#installing-development-tree-prerequisites" title="Prerequisites for Installing from Development Source">Prerequisites for Installing from Development Source</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#installing-development-tree-git" title="Setting Up a MySQL Git Repository">Setting Up a MySQL Git Repository</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="installing-development-tree-prerequisites"></a>Prerequisites for Installing from Development Source</h4>

</div>

</div>

</div>
<p>
        To install MySQL from a development source tree, your system
        must satisfy the tool requirements listed at
        <a class="xref" href="installing.html#source-installation-prerequisites" title="2.9.2 Source Installation Prerequisites">Section 2.9.2, “Source Installation Prerequisites”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="installing-development-tree-git"></a>Setting Up a MySQL Git Repository</h4>

</div>

</div>

</div>
<p>
        To set up a MySQL Git repository on your machine, use this
        procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Clone the MySQL Git repository to your machine. The
            following command clones the MySQL Git repository to a
            directory named <code class="filename">mysql-server</code>. The
            initial download will take some time to complete, depending
            on the speed of your connection.
          </p><pre data-lang="terminal" class="programlisting">~$ git clone https://github.com/mysql/mysql-server.git
Cloning into 'mysql-server'...
remote: Counting objects: 1198513, done.
remote: Total 1198513 (delta 0), reused 0 (delta 0), pack-reused 1198513
Receiving objects: 100% (1198513/1198513), 1.01 GiB | 7.44 MiB/s, done.
Resolving deltas: 100% (993200/993200), done.
Checking connectivity... done.
Checking out files: 100% (25510/25510), done.</pre></li><li class="listitem"><p>
            When the clone operation completes, the contents of your
            local MySQL Git repository appear similar to the following:
          </p><pre data-lang="terminal" class="programlisting">~$ cd mysql-server
~/mysql-server$ ls
BUILD                cmd-line-utils       libservices          sql
CMakeLists.txt       config.h.cmake       man                  sql-common
COPYING              configure.cmake      mysql-test           storage
Docs                 dbug                 mysys                strings
Doxyfile-perfschema  extra                mysys_ssl            support-files
INSTALL              include              packaging            testclients
README               libbinlogevents      plugin               unittest
VERSION              libbinlogstandalone  rapid                vio
client               libevent             regex                win
cmake                libmysql             scripts              zlib</pre></li><li class="listitem"><p>
            Use the <span class="command"><strong>git branch -r</strong></span> command to view the
            remote tracking branches for the MySQL repository.
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git branch -r
  origin/5.5
  origin/5.6
  origin/5.7
  origin/8.0
  origin/HEAD -&gt; origin/5.7
  origin/cluster-7.2
  origin/cluster-7.3
  origin/cluster-7.4
  origin/cluster-7.5</pre></li><li class="listitem"><p>
            To view the branches that are checked out in your local
            repository, issue the <span class="command"><strong>git branch</strong></span> command.
            When you cloned the MySQL Git repository, the MySQL 5.7
            branch was checked out automatically. The asterisk
            identifies the 5.7 branch as the active branch.
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git branch
* 5.7</pre></li><li class="listitem"><p>
            To check out a different MySQL branch, run the <span class="command"><strong>git
            checkout</strong></span> command, specifying the branch name. For
            example, to check out the MySQL 8.0 branch:
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git checkout 8.0
Checking out files: 100% (9600/9600), done.
Branch 8.0 set up to track remote branch 8.0 from origin.
Switched to a new branch '8.0'</pre></li><li class="listitem"><p>
            Run <code class="literal">git branch</code> to verify that the MySQL
            8.0 branch is present. MySQL 8.0, which is the last branch
            you checked out, is marked by an asterisk indicating that it
            is the active branch.
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git branch
  5.7
* 8.0</pre></li><li class="listitem"><p>
            Use the <span class="command"><strong>git checkout</strong></span> command to switch
            between branches. For example:
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git checkout 5.7</pre></li><li class="listitem"><p>
            To obtain changes made after your initial setup of the MySQL
            Git repository, switch to the branch you want to update and
            issue the <code class="literal">git pull</code> command:
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git checkout 8.0
~/mysql-server$ git pull</pre><p>
            To examine the commit history, use the <code class="literal">git
            log</code> option:
          </p><pre data-lang="terminal" class="programlisting">~/mysql-server$ git log</pre><p>
            You can also browse commit history and source code on the
            GitHub <a class="ulink" href="https://github.com/mysql" target="_top">MySQL</a>
            site.
          </p><p>
            If you see changes or code that you have a question about,
            ask on the
            <a class="ulink" href="https://mysqlcommunity.slack.com/" target="_top">MySQL
            Community Slack</a>. For information about contributing
            a patch, see
            <a class="ulink" href="http://mysqlserverteam.com/contributing-to-mysql-server/%20" target="_top">Contributing
            to MySQL Server</a>.
          </p></li><li class="listitem"><p>
            After you have cloned the MySQL Git repository and have
            checked out the branch you want to build, you can build
            MySQL Server from the source code. Instructions are provided
            in <a class="xref" href="installing.html#installing-source-distribution" title="2.9.4 Installing MySQL Using a Standard Source Distribution">Section 2.9.4, “Installing MySQL Using a Standard Source Distribution”</a>, except
            that you skip the part about obtaining and unpacking the
            distribution.
          </p><p>
            Be careful about installing a build from a distribution
            source tree on a production machine. The installation
            command may overwrite your live release installation. If you
            already have MySQL installed and do not want to overwrite
            it, run <span class="command"><strong>CMake</strong></span> with values for the
            <a class="link" href="installing.html#option_cmake_cmake_install_prefix"><code class="option">CMAKE_INSTALL_PREFIX</code></a>,
            <a class="link" href="installing.html#option_cmake_mysql_tcp_port"><code class="option">MYSQL_TCP_PORT</code></a>, and
            <a class="link" href="installing.html#option_cmake_mysql_unix_addr"><code class="option">MYSQL_UNIX_ADDR</code></a> options
            different from those used by your production server. For
            additional information about preventing multiple servers
            from interfering with each other, see
            <a class="xref" href="server-administration.html#multiple-servers" title="5.8 Running Multiple MySQL Instances on One Machine">Section 5.8, “Running Multiple MySQL Instances on One Machine”</a>.
          </p><p>
            Play hard with your new installation. For example, try to
            make new features crash. Start by running <span class="command"><strong>make
            test</strong></span>. See <a class="xref" href="extending-mysql.html#mysql-test-suite" title="29.1.2 The MySQL Test Suite">Section 29.1.2, “The MySQL Test Suite”</a>.
</p></li></ol>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-ssl-library-configuration"></a>2.9.6 Configuring SSL Library Support</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444440378880"></a><a class="indexterm" name="idm46444440377392"></a><p>
      An SSL library is required for support of encrypted connections,
      entropy for random number generation, and other encryption-related
      operations.
    </p><p>
      If you compile MySQL from a source distribution,
      <span class="command"><strong>CMake</strong></span> configures the distribution to use the
      installed OpenSSL library by default.
    </p><p>
      To compile using OpenSSL, use this procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Ensure that OpenSSL 1.0.1 or higher is installed on your
          system. If the installed OpenSSL version is lower than 1.0.1,
          <span class="command"><strong>CMake</strong></span> produces an error at MySQL
          configuration time. If it is necessary to obtain OpenSSL,
          visit <a class="ulink" href="http://www.openssl.org" target="_top">http://www.openssl.org</a>.
        </p></li><li class="listitem"><p>
          The <a class="link" href="installing.html#option_cmake_with_ssl"><code class="option">WITH_SSL</code></a>
          <span class="command"><strong>CMake</strong></span> option determines which SSL library
          to use for compiling MySQL (see
          <a class="xref" href="installing.html#source-configuration-options" title="2.9.7 MySQL Source-Configuration Options">Section 2.9.7, “MySQL Source-Configuration Options”</a>). The default
          is <a class="link" href="installing.html#option_cmake_with_ssl"><code class="option">-DWITH_SSL=system</code></a>, which uses
          OpenSSL. To make this explicit, specify that option on the
          <span class="command"><strong>CMake</strong></span> command line. For example:
        </p><pre data-lang="terminal" class="programlisting">cmake . -DWITH_SSL=system</pre><p>
          That command configures the distribution to use the installed
          OpenSSL library. Alternatively, to explicitly specify the path
          name to the OpenSSL installation, use the following syntax.
          This can be useful if you have multiple versions of OpenSSL
          installed, to prevent <span class="command"><strong>CMake</strong></span> from choosing
          the wrong one:
        </p><pre data-lang="terminal" class="programlisting">cmake . -DWITH_SSL=<em class="replaceable"><code>path_name</code></em>
</pre></li><li class="listitem"><p>
          Compile and install the distribution.
</p></li></ol>
</div>
<p>
      To check whether a <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server supports
      encrypted connections, examine the value of the
      <a class="link" href="server-administration.html#sysvar_have_ssl"><code class="literal">have_ssl</code></a> system variable:
    </p><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>SHOW VARIABLES LIKE 'have_ssl';</code></strong>
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_ssl      | YES   |
+---------------+-------+
</pre><p>
      If the value is <code class="literal">YES</code>, the server supports
      encrypted connections. If the value is
      <code class="literal">DISABLED</code>, the server is capable of supporting
      encrypted connections but was not started with the appropriate
      <code class="option">--ssl-<em class="replaceable"><code>xxx</code></em></code> options to
      enable encrypted connections to be used; see
      <a class="xref" href="security.html#using-encrypted-connections" title="6.3.1 Configuring MySQL to Use Encrypted Connections">Section 6.3.1, “Configuring MySQL to Use Encrypted Connections”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-configuration-options"></a>2.9.7 MySQL Source-Configuration Options</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444449582352"></a><a class="indexterm" name="idm46444449580864"></a><a class="indexterm" name="idm46444449579376"></a><p>
      The <span class="command"><strong>CMake</strong></span> program provides a great deal of
      control over how you configure a MySQL source distribution.
      Typically, you do this using options on the
      <span class="command"><strong>CMake</strong></span> command line. For information about
      options supported by <span class="command"><strong>CMake</strong></span>, run either of these
      commands in the top-level source directory:
    </p><pre data-lang="terminal" class="programlisting">cmake . -LH
ccmake .</pre><p>
      You can also affect <span class="command"><strong>CMake</strong></span> using certain
      environment variables. See
      <a class="xref" href="programs.html#environment-variables" title="4.9 Environment Variables">Section 4.9, “Environment Variables”</a>.
    </p><p>
      For boolean options, the value may be specified as 1 or
      <code class="literal">ON</code> to enable the option, or as 0 or
      <code class="literal">OFF</code> to disable the option.
    </p><p>
      Many options configure compile-time defaults that can be
      overridden at server startup. For example, the
      <a class="link" href="installing.html#option_cmake_cmake_install_prefix"><code class="option">CMAKE_INSTALL_PREFIX</code></a>,
      <a class="link" href="installing.html#option_cmake_mysql_tcp_port"><code class="option">MYSQL_TCP_PORT</code></a>, and
      <a class="link" href="installing.html#option_cmake_mysql_unix_addr"><code class="option">MYSQL_UNIX_ADDR</code></a> options that
      configure the default installation base directory location, TCP/IP
      port number, and Unix socket file can be changed at server startup
      with the <a class="link" href="server-administration.html#sysvar_basedir"><code class="option">--basedir</code></a>,
      <a class="link" href="server-administration.html#option_mysqld_port"><code class="option">--port</code></a>, and
      <a class="link" href="server-administration.html#option_mysqld_socket"><code class="option">--socket</code></a> options for
      <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>. Where applicable, configuration option
      descriptions indicate the corresponding <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
      startup option.
    </p><p>
      The following sections provide more information about
      <span class="command"><strong>CMake</strong></span> options.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#cmake-option-reference" title="CMake Option Reference">CMake Option Reference</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#cmake-general-options" title="General Options">General Options</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#cmake-installation-layout-options" title="Installation Layout Options">Installation Layout Options</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#option_cmake_storage_engine_options" title="Storage Engine Options">Storage Engine Options</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#cmake-feature-options" title="Feature Options">Feature Options</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#cmake-compiler-flags" title="Compiler Flags">Compiler Flags</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#cmake-mysql-cluster-options" title="CMake Options for Compiling NDB Cluster">CMake Options for Compiling NDB Cluster</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="cmake-option-reference"></a>CMake Option Reference</h4>

</div>

</div>

</div>
<p>
        The following table shows the available <span class="command"><strong>CMake</strong></span>
        options. In the <code class="literal">Default</code> column,
        <code class="literal">PREFIX</code> stands for the value of the
        <a class="link" href="installing.html#option_cmake_cmake_install_prefix"><code class="option">CMAKE_INSTALL_PREFIX</code></a> option, which
        specifies the installation base directory. This value is used as
        the parent location for several of the installation
        subdirectories.
</p>
<div class="table">
<a name="idm46444440233424"></a><p class="title"><b>Table 2.13 MySQL Source-Configuration Option Reference
(CMake)</b></p>
<div class="table-contents">
<table frame="box" rules="all" summary="CMake options that are available to configure MySQL when building from source."><col width="30%"><col width="30%"><col width="20%"><col width="10%"><col width="10%"><thead><tr><th scope="col">Formats</th>
<th scope="col">Description</th>
<th scope="col">Default</th>
<th scope="col">Introduced</th>
<th scope="col">Removed</th>
</tr></thead><tbody><tr><td scope="row"><a class="link" href="installing.html#option_cmake_add_gdb_index"><code class="literal">ADD_GDB_INDEX</code></a></td>
<td>Whether to enable generation of .gdb_index section in binaries</td>
<td></td>
<td>8.0.18</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_build_config"><code class="literal">BUILD_CONFIG</code></a></td>
<td>Use same build options as official releases</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_bundle_runtime_libraries"><code class="literal">BUNDLE_RUNTIME_LIBRARIES</code></a></td>
<td>Bundle runtime libraries with server MSI and Zip packages for Windows</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_cmake_build_type"><code class="literal">CMAKE_BUILD_TYPE</code></a></td>
<td>Type of build to produce</td>
<td><code class="literal">RelWithDebInfo</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_cmake_cxx_flags"><code class="literal">CMAKE_CXX_FLAGS</code></a></td>
<td>Flags for C++ Compiler</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_cmake_c_flags"><code class="literal">CMAKE_C_FLAGS</code></a></td>
<td>Flags for C Compiler</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_cmake_install_prefix"><code class="literal">CMAKE_INSTALL_PREFIX</code></a></td>
<td>Installation base directory</td>
<td><code class="literal">/usr/local/mysql</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><code class="literal">CMAKE_INSTALL_PRIV_LIBDIR</code></td>
<td>Installation private library directory</td>
<td></td>
<td>8.0.18</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_compilation_comment"><code class="literal">COMPILATION_COMMENT</code></a></td>
<td>Comment about compilation environment</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_compilation_comment_server"><code class="literal">COMPILATION_COMMENT_SERVER</code></a></td>
<td>Comment about compilation environment for use by mysqld</td>
<td></td>
<td>8.0.14</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_cpack_monolithic_install"><code class="literal">CPACK_MONOLITHIC_INSTALL</code></a></td>
<td>Whether package build produces single file</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_default_charset"><code class="literal">DEFAULT_CHARSET</code></a></td>
<td>The default server character set</td>
<td><code class="literal">utf8mb4</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_default_collation"><code class="literal">DEFAULT_COLLATION</code></a></td>
<td>The default server collation</td>
<td><code class="literal">utf8mb4_0900_ai_ci</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><code class="literal">DISABLE_DATA_LOCK</code></td>
<td>Exclude the performance schema data lock instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_cond"><code class="literal">DISABLE_PSI_COND</code></a></td>
<td>Exclude Performance Schema condition instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_error"><code class="literal">DISABLE_PSI_ERROR</code></a></td>
<td>Exclude the performance schema server error instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_file"><code class="literal">DISABLE_PSI_FILE</code></a></td>
<td>Exclude Performance Schema file instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_idle"><code class="literal">DISABLE_PSI_IDLE</code></a></td>
<td>Exclude Performance Schema idle instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_memory"><code class="literal">DISABLE_PSI_MEMORY</code></a></td>
<td>Exclude Performance Schema memory instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_metadata"><code class="literal">DISABLE_PSI_METADATA</code></a></td>
<td>Exclude Performance Schema metadata instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_mutex"><code class="literal">DISABLE_PSI_MUTEX</code></a></td>
<td>Exclude Performance Schema mutex instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_ps"><code class="literal">DISABLE_PSI_PS</code></a></td>
<td>Exclude the performance schema prepared statements</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_rwlock"><code class="literal">DISABLE_PSI_RWLOCK</code></a></td>
<td>Exclude Performance Schema rwlock instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_socket"><code class="literal">DISABLE_PSI_SOCKET</code></a></td>
<td>Exclude Performance Schema socket instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_sp"><code class="literal">DISABLE_PSI_SP</code></a></td>
<td>Exclude Performance Schema stored program instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_stage"><code class="literal">DISABLE_PSI_STAGE</code></a></td>
<td>Exclude Performance Schema stage instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_statement"><code class="literal">DISABLE_PSI_STATEMENT</code></a></td>
<td>Exclude Performance Schema statement instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_statement_digest"><code class="literal">DISABLE_PSI_STATEMENT_DIGEST</code></a></td>
<td>Exclude Performance Schema statements_digest instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_table"><code class="literal">DISABLE_PSI_TABLE</code></a></td>
<td>Exclude Performance Schema table instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_thread"><code class="literal">DISABLE_PSI_THREAD</code></a></td>
<td>Exclude the performance schema thread instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_psi_transaction"><code class="literal">DISABLE_PSI_TRANSACTION</code></a></td>
<td>Exclude the performance schema transaction instrumentation</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_disable_shared"><code class="literal">DISABLE_SHARED</code></a></td>
<td>Do not build shared libraries, compile position-dependent code</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td>8.0.18</td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_download_boost"><code class="literal">DOWNLOAD_BOOST</code></a></td>
<td>Whether to download the Boost library</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_download_boost_timeout"><code class="literal">DOWNLOAD_BOOST_TIMEOUT</code></a></td>
<td>Timeout in seconds for downloading the Boost library</td>
<td><code class="literal">600</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_enabled_local_infile"><code class="literal">ENABLED_LOCAL_INFILE</code></a></td>
<td>Whether to enable LOCAL for LOAD DATA</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_enabled_profiling"><code class="literal">ENABLED_PROFILING</code></a></td>
<td>Whether to enable query profiling code</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_enable_downloads"><code class="literal">ENABLE_DOWNLOADS</code></a></td>
<td>Whether to download optional files</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_enable_experimental_sysvars"><code class="literal">ENABLE_EXPERIMENTAL_SYSVARS</code></a></td>
<td>Whether to enabled experimental InnoDB system variables</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_enable_gcov"><code class="literal">ENABLE_GCOV</code></a></td>
<td>Whether to include gcov support</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_enable_gprof"><code class="literal">ENABLE_GPROF</code></a></td>
<td>Enable gprof (optimized Linux builds only)</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_force_insource_build"><code class="literal">FORCE_INSOURCE_BUILD</code></a></td>
<td>Whether to force an in-source build</td>
<td><code class="literal">OFF</code></td>
<td>8.0.14</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_force_unsupported_compiler"><code class="literal">FORCE_UNSUPPORTED_COMPILER</code></a></td>
<td>Whether to permit unsupported compiler</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_fprofile_generate"><code class="literal">FPROFILE_GENERATE</code></a></td>
<td>Whether to generate profile guided optimization data</td>
<td><code class="literal">OFF</code></td>
<td>8.0.19</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_fprofile_use"><code class="literal">FPROFILE_USE</code></a></td>
<td>Whether to use profile guided optimization data</td>
<td><code class="literal">OFF</code></td>
<td>8.0.19</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_ignore_aio_check"><code class="literal">IGNORE_AIO_CHECK</code></a></td>
<td>With -DBUILD_CONFIG=mysql_release, ignore libaio check</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_bindir"><code class="literal">INSTALL_BINDIR</code></a></td>
<td>User executables directory</td>
<td><code class="literal">PREFIX/bin</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_docdir"><code class="literal">INSTALL_DOCDIR</code></a></td>
<td>Documentation directory</td>
<td><code class="literal">PREFIX/docs</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_docreadmedir"><code class="literal">INSTALL_DOCREADMEDIR</code></a></td>
<td>README file directory</td>
<td><code class="literal">PREFIX</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_includedir"><code class="literal">INSTALL_INCLUDEDIR</code></a></td>
<td>Header file directory</td>
<td><code class="literal">PREFIX/include</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_infodir"><code class="literal">INSTALL_INFODIR</code></a></td>
<td>Info file directory</td>
<td><code class="literal">PREFIX/docs</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_layout"><code class="literal">INSTALL_LAYOUT</code></a></td>
<td>Select predefined installation layout</td>
<td><code class="literal">STANDALONE</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_libdir"><code class="literal">INSTALL_LIBDIR</code></a></td>
<td>Library file directory</td>
<td><code class="literal">PREFIX/lib</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_mandir"><code class="literal">INSTALL_MANDIR</code></a></td>
<td>Manual page directory</td>
<td><code class="literal">PREFIX/man</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_mysqlkeyringdir"><code class="literal">INSTALL_MYSQLKEYRINGDIR</code></a></td>
<td>Directory for keyring_file plugin data file</td>
<td><code class="literal">platform specific</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_mysqlsharedir"><code class="literal">INSTALL_MYSQLSHAREDIR</code></a></td>
<td>Shared data directory</td>
<td><code class="literal">PREFIX/share</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_mysqltestdir"><code class="literal">INSTALL_MYSQLTESTDIR</code></a></td>
<td>mysql-test directory</td>
<td><code class="literal">PREFIX/mysql-test</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_pkgconfigdir"><code class="literal">INSTALL_PKGCONFIGDIR</code></a></td>
<td>Directory for mysqlclient.pc pkg-config file</td>
<td><code class="literal">INSTALL_LIBDIR/pkgconfig</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_plugindir"><code class="literal">INSTALL_PLUGINDIR</code></a></td>
<td>Plugin directory</td>
<td><code class="literal">PREFIX/lib/plugin</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_sbindir"><code class="literal">INSTALL_SBINDIR</code></a></td>
<td>Server executable directory</td>
<td><code class="literal">PREFIX/bin</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_secure_file_privdir"><code class="literal">INSTALL_SECURE_FILE_PRIVDIR</code></a></td>
<td>secure_file_priv default value</td>
<td><code class="literal">platform specific</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_sharedir"><code class="literal">INSTALL_SHAREDIR</code></a></td>
<td>aclocal/mysql.m4 installation directory</td>
<td><code class="literal">PREFIX/share</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_static_libraries"><code class="literal">INSTALL_STATIC_LIBRARIES</code></a></td>
<td>Whether to install static libraries</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_install_supportfilesdir"><code class="literal">INSTALL_SUPPORTFILESDIR</code></a></td>
<td>Extra support files directory</td>
<td><code class="literal">PREFIX/support-files</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_link_randomize"><code class="literal">LINK_RANDOMIZE</code></a></td>
<td>Whether to randomize order of symbols in mysqld binary</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_link_randomize_seed"><code class="literal">LINK_RANDOMIZE_SEED</code></a></td>
<td>Seed value for LINK_RANDOMIZE option</td>
<td><code class="literal">mysql</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_max_indexes"><code class="literal">MAX_INDEXES</code></a></td>
<td>Maximum indexes per table</td>
<td><code class="literal">64</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mutex_type"><code class="literal">MUTEX_TYPE</code></a></td>
<td>InnoDB mutex type</td>
<td><code class="literal">event</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysqlx_tcp_port"><code class="literal">MYSQLX_TCP_PORT</code></a></td>
<td>TCP/IP port number used by X Plugin</td>
<td><code class="literal">33060</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysqlx_unix_addr"><code class="literal">MYSQLX_UNIX_ADDR</code></a></td>
<td>Unix socket file used by X Plugin</td>
<td><code class="literal">/tmp/mysqlx.sock</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysql_datadir"><code class="literal">MYSQL_DATADIR</code></a></td>
<td>Data directory</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysql_maintainer_mode"><code class="literal">MYSQL_MAINTAINER_MODE</code></a></td>
<td>Whether to enable MySQL maintainer-specific development environment</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysql_project_name"><code class="literal">MYSQL_PROJECT_NAME</code></a></td>
<td>Windows/OS X project name</td>
<td><code class="literal">MySQL</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysql_tcp_port"><code class="literal">MYSQL_TCP_PORT</code></a></td>
<td>TCP/IP port number</td>
<td><code class="literal">3306</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_mysql_unix_addr"><code class="literal">MYSQL_UNIX_ADDR</code></a></td>
<td>Unix socket file</td>
<td><code class="literal">/tmp/mysql.sock</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_odbc_includes"><code class="literal">ODBC_INCLUDES</code></a></td>
<td>ODBC includes directory</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_odbc_lib_dir"><code class="literal">ODBC_LIB_DIR</code></a></td>
<td>ODBC library directory</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_optimizer_trace"><code class="literal">OPTIMIZER_TRACE</code></a></td>
<td>Whether to support optimizer tracing</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_reproducible_build"><code class="literal">REPRODUCIBLE_BUILD</code></a></td>
<td>Take extra care to create a build result independent of build location and time</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_sysconfdir"><code class="literal">SYSCONFDIR</code></a></td>
<td>Option file directory</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_systemd_pid_dir"><code class="literal">SYSTEMD_PID_DIR</code></a></td>
<td>Directory for PID file under systemd</td>
<td><code class="literal">/var/run/mysqld</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_systemd_service_name"><code class="literal">SYSTEMD_SERVICE_NAME</code></a></td>
<td>Name of MySQL service under systemd</td>
<td><code class="literal">mysqld</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_tmpdir"><code class="literal">TMPDIR</code></a></td>
<td>tmpdir default value</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_use_ld_gold"><code class="literal">USE_LD_GOLD</code></a></td>
<td>Whether to use GNU gold linker</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_use_ld_lld"><code class="literal">USE_LD_LLD</code></a></td>
<td>Whether to use llvm lld linker</td>
<td><code class="literal">ON</code></td>
<td>8.0.16</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_win_debug_no_inline"><code class="literal">WIN_DEBUG_NO_INLINE</code></a></td>
<td>Whether to disable function inlining</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_storage_engine_options" title="Storage Engine Options"><code class="literal">WITHOUT_xxx_STORAGE_ENGINE</code></a></td>
<td>Exclude storage engine xxx from build</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_ant"><code class="literal">WITH_ANT</code></a></td>
<td>Path to Ant for building GCS Java wrapper</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_asan"><code class="literal">WITH_ASAN</code></a></td>
<td>Enable AddressSanitizer</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_asan_scope"><code class="literal">WITH_ASAN_SCOPE</code></a></td>
<td>Enable AddressSanitizer -fsanitize-address-use-after-scope Clang flag</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_authentication_ldap"><code class="literal">WITH_AUTHENTICATION_LDAP</code></a></td>
<td>Whether to report error if LDAP authentication plugins cannot be built</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_authentication_pam"><code class="literal">WITH_AUTHENTICATION_PAM</code></a></td>
<td>Build PAM authentication plugin</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_aws_sdk"><code class="literal">WITH_AWS_SDK</code></a></td>
<td>Location of Amazon Web Services software development kit</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_boost"><code class="literal">WITH_BOOST</code></a></td>
<td>The location of the Boost library sources</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_client_protocol_tracing"><code class="literal">WITH_CLIENT_PROTOCOL_TRACING</code></a></td>
<td>Build client-side protocol tracing framework</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_curl"><code class="literal">WITH_CURL</code></a></td>
<td>Location of curl library</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_debug"><code class="literal">WITH_DEBUG</code></a></td>
<td>Whether to include debugging support</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_default_compiler_options"><code class="literal">WITH_DEFAULT_COMPILER_OPTIONS</code></a></td>
<td>Whether to use default compiler options</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_default_feature_set"><code class="literal">WITH_DEFAULT_FEATURE_SET</code></a></td>
<td>Whether to use default feature set</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_editline"><code class="literal">WITH_EDITLINE</code></a></td>
<td>Which libedit/editline library to use</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_gmock"><code class="literal">WITH_GMOCK</code></a></td>
<td>Path to googlemock distribution</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_icu"><code class="literal">WITH_ICU</code></a></td>
<td>Type of ICU support</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_innodb_extra_debug"><code class="literal">WITH_INNODB_EXTRA_DEBUG</code></a></td>
<td>Whether to include extra debugging support for InnoDB.</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_innodb_memcached"><code class="literal">WITH_INNODB_MEMCACHED</code></a></td>
<td>Whether to generate memcached shared libraries.</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_jemalloc"><code class="literal">WITH_JEMALLOC</code></a></td>
<td>Whether to link with -ljemalloc</td>
<td><code class="literal">OFF</code></td>
<td>8.0.16</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_keyring_test"><code class="literal">WITH_KEYRING_TEST</code></a></td>
<td>Build the keyring test program</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_libevent"><code class="literal">WITH_LIBEVENT</code></a></td>
<td>Which libevent library to use</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_libwrap"><code class="literal">WITH_LIBWRAP</code></a></td>
<td>Whether to include libwrap (TCP wrappers) support</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_lock_order"><code class="literal">WITH_LOCK_ORDER</code></a></td>
<td>Whether to enable LOCK_ORDER tooling</td>
<td><code class="literal">OFF</code></td>
<td>8.0.17</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_lsan"><code class="literal">WITH_LSAN</code></a></td>
<td>Whether to run LeakSanitizer, without AddressSanitizer</td>
<td><code class="literal">OFF</code></td>
<td>8.0.16</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_lto"><code class="literal">WITH_LTO</code></a></td>
<td>Enable link-time optimizer</td>
<td><code class="literal">OFF</code></td>
<td>8.0.13</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_lz4"><code class="literal">WITH_LZ4</code></a></td>
<td>Type of LZ4 library support</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_lzma"><code class="literal">WITH_LZMA</code></a></td>
<td>Type of LZMA library support</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td>8.0.16</td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_mecab"><code class="literal">WITH_MECAB</code></a></td>
<td>Compiles MeCab</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_msan"><code class="literal">WITH_MSAN</code></a></td>
<td>Enable MemorySanitizer</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_mscrt_debug"><code class="literal">WITH_MSCRT_DEBUG</code></a></td>
<td>Enable Visual Studio CRT memory leak tracing</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_mysqlx"><code class="literal">WITH_MYSQLX</code></a></td>
<td>Whether to disable X Protocol</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_numa"><code class="literal">WITH_NUMA</code></a></td>
<td>Set NUMA memory allocation policy</td>
<td></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_protobuf"><code class="literal">WITH_PROTOBUF</code></a></td>
<td>Which Protocol Buffers package to use</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_rapid"><code class="literal">WITH_RAPID</code></a></td>
<td>Whether to build rapid development cycle plugins</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_rapidjson"><code class="literal">WITH_RAPIDJSON</code></a></td>
<td>Type of RapidJSON support</td>
<td><code class="literal">bundled</code></td>
<td>8.0.13</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_re2"><code class="literal">WITH_RE2</code></a></td>
<td>Type of RE2 library support</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td>8.0.18</td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_router"><code class="literal">WITH_ROUTER</code></a></td>
<td>Whether to build MySQL Router</td>
<td><code class="literal">ON</code></td>
<td>8.0.16</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_ssl"><code class="literal">WITH_SSL</code></a></td>
<td>Type of SSL support</td>
<td><code class="literal">system</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_systemd"><code class="literal">WITH_SYSTEMD</code></a></td>
<td>Enable installation of systemd support files</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_system_libs"><code class="literal">WITH_SYSTEM_LIBS</code></a></td>
<td>Set system value of library options not set explicitly</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_test_trace_plugin"><code class="literal">WITH_TEST_TRACE_PLUGIN</code></a></td>
<td>Build test protocol trace plugin</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_tsan"><code class="literal">WITH_TSAN</code></a></td>
<td>Enable ThreadSanitizer</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_ubsan"><code class="literal">WITH_UBSAN</code></a></td>
<td>Enable Undefined Behavior Sanitizer</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_unit_tests"><code class="literal">WITH_UNIT_TESTS</code></a></td>
<td>Compile MySQL with unit tests</td>
<td><code class="literal">ON</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_unixodbc"><code class="literal">WITH_UNIXODBC</code></a></td>
<td>Enable unixODBC support</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_valgrind"><code class="literal">WITH_VALGRIND</code></a></td>
<td>Whether to compile in Valgrind header files</td>
<td><code class="literal">OFF</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_zlib"><code class="literal">WITH_ZLIB</code></a></td>
<td>Type of zlib support</td>
<td><code class="literal">bundled</code></td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_with_zstd"><code class="literal">WITH_ZSTD</code></a></td>
<td>Type of zstd support</td>
<td><code class="literal">bundled</code></td>
<td>8.0.18</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="installing.html#option_cmake_storage_engine_options" title="Storage Engine Options"><code class="literal">WITH_xxx_STORAGE_ENGINE</code></a></td>
<td>Compile storage engine xxx statically into server</td>
<td></td>
<td></td>
<td></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="cmake-general-options"></a>General Options</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_cmake_build_config"></a>
            <a class="indexterm" name="idm46444439436064"></a>

            <a class="indexterm" name="idm46444439434576"></a>

            <code class="literal">-DBUILD_CONFIG=mysql_release</code>
          </p><p>
            This option configures a source distribution with the same
            build options used by Oracle to produce binary distributions
            for official MySQL releases.
          </p></li><li class="listitem"><p><a name="option_cmake_bundle_runtime_libraries"></a>
            <code class="literal">-DBUNDLE_RUNTIME_LIBRARIES=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444439429488"></a><a class="indexterm" name="idm46444439427984"></a><p>
            Whether to bundle runtime libraries with server MSI and Zip
            packages for Windows.
          </p></li><li class="listitem"><p><a name="option_cmake_cmake_build_type"></a>
            <a class="indexterm" name="idm46444439424880"></a>

            <a class="indexterm" name="idm46444439423392"></a>

            <code class="literal">-DCMAKE_BUILD_TYPE=<em class="replaceable"><code>type</code></em></code>
          </p><p>
            The type of build to produce:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">RelWithDebInfo</code>: Enable optimizations
                and generate debugging information. This is the default
                MySQL build type.
              </p></li><li class="listitem"><p>
                <code class="literal">Release</code>: Enable optimizations but
                omit debugging information to reduce the build size.
                This build type was added in MySQL 8.0.13.
              </p></li><li class="listitem"><p>
                <code class="literal">Debug</code>: Disable optimizations and
                generate debugging information. This build type is also
                used if the <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">WITH_DEBUG</code></a>
                option is enabled. That is,
                <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">-DWITH_DEBUG=1</code></a> has the
                same effect as
                <a class="link" href="installing.html#option_cmake_cmake_build_type"><code class="option">-DCMAKE_BUILD_TYPE=Debug</code></a>.
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_cpack_monolithic_install"></a>
            <a class="indexterm" name="idm46444439411040"></a>

            <a class="indexterm" name="idm46444439409584"></a>

            <code class="literal">-DCPACK_MONOLITHIC_INSTALL=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            This option affects whether the <span class="command"><strong>make
            package</strong></span> operation produces multiple installation
            package files or a single file. If disabled, the operation
            produces multiple installation package files, which may be
            useful if you want to install only a subset of a full MySQL
            installation. If enabled, it produces a single file for
            installing everything.
          </p></li><li class="listitem"><p><a name="option_cmake_force_insource_build"></a>
            <a class="indexterm" name="idm46444439404272"></a>

            <a class="indexterm" name="idm46444439402816"></a>

            <code class="literal">-DFORCE_INSOURCE_BUILD=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Defines whether to force an in-source build. Out-of-source
            builds are recommended, as they permit multiple builds from
            the same source, and cleanup can be performed quickly by
            removing the build directory. To force an in-source build,
            invoke <span class="command"><strong>CMake</strong></span> with
            <a class="link" href="installing.html#option_cmake_force_insource_build"><code class="option">-DFORCE_INSOURCE_BUILD=ON</code></a>.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="cmake-installation-layout-options"></a>Installation Layout Options</h4>

</div>

</div>

</div>
<p>
        The <a class="link" href="installing.html#option_cmake_cmake_install_prefix"><code class="option">CMAKE_INSTALL_PREFIX</code></a> option
        indicates the base installation directory. Other options with
        names of the form
        <code class="literal">INSTALL_<em class="replaceable"><code>xxx</code></em></code> that
        indicate component locations are interpreted relative to the
        prefix and their values are relative pathnames. Their values
        should not include the prefix.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_cmake_cmake_install_prefix"></a>
            <a class="indexterm" name="idm46444439392432"></a>

            <a class="indexterm" name="idm46444439390976"></a>

            <code class="literal">-DCMAKE_INSTALL_PREFIX=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The installation base directory.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#sysvar_basedir"><code class="option">--basedir</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_install_bindir"></a>
            <a class="indexterm" name="idm46444439385376"></a>

            <a class="indexterm" name="idm46444439383888"></a>

            <code class="literal">-DINSTALL_BINDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install user programs.
          </p></li><li class="listitem"><p><a name="option_cmake_install_docdir"></a>
            <a class="indexterm" name="idm46444439379808"></a>

            <a class="indexterm" name="idm46444439378320"></a>

            <code class="literal">-DINSTALL_DOCDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install documentation.
          </p></li><li class="listitem"><p><a name="option_cmake_install_docreadmedir"></a>
            <a class="indexterm" name="idm46444439374176"></a>

            <a class="indexterm" name="idm46444439372720"></a>

            <code class="literal">-DINSTALL_DOCREADMEDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install <code class="filename">README</code> files.
          </p></li><li class="listitem"><p><a name="option_cmake_install_includedir"></a>
            <a class="indexterm" name="idm46444439367808"></a>

            <a class="indexterm" name="idm46444439366352"></a>

            <code class="literal">-DINSTALL_INCLUDEDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install header files.
          </p></li><li class="listitem"><p><a name="option_cmake_install_infodir"></a>
            <a class="indexterm" name="idm46444439362208"></a>

            <a class="indexterm" name="idm46444439360720"></a>

            <code class="literal">-DINSTALL_INFODIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install Info files.
          </p></li><li class="listitem"><p><a name="option_cmake_install_layout"></a>
            <a class="indexterm" name="idm46444439356576"></a>

            <a class="indexterm" name="idm46444439355088"></a>

            <code class="literal">-DINSTALL_LAYOUT=<em class="replaceable"><code>name</code></em></code>
          </p><p>
            Select a predefined installation layout:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">STANDALONE</code>: Same layout as used for
                <code class="filename">.tar.gz</code> and
                <code class="filename">.zip</code> packages. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">RPM</code>: Layout similar to RPM packages.
              </p></li><li class="listitem"><p>
                <code class="literal">SVR4</code>: Solaris package layout.
              </p></li><li class="listitem"><p>
                <code class="literal">DEB</code>: DEB package layout
                (experimental).
</p></li></ul>
</div>
<p>
            You can select a predefined layout but modify individual
            component installation locations by specifying other
            options. For example:
          </p><pre data-lang="terminal" class="programlisting">cmake . -DINSTALL_LAYOUT=SVR4 -DMYSQL_DATADIR=/var/mysql/data</pre><p>
            The <a class="link" href="installing.html#option_cmake_install_layout"><code class="option">INSTALL_LAYOUT</code></a> value
            determines the default value of the
            <a class="link" href="server-administration.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a>,
            <a class="link" href="security.html#sysvar_keyring_encrypted_file_data"><code class="literal">keyring_encrypted_file_data</code></a>,
            and <a class="link" href="security.html#sysvar_keyring_file_data"><code class="literal">keyring_file_data</code></a>
            system variables. See the descriptions of those variables in
            <a class="xref" href="server-administration.html#server-system-variables" title="5.1.8 Server System Variables">Section 5.1.8, “Server System Variables”</a>, and
            <a class="xref" href="security.html#keyring-system-variables" title="6.4.4.12 Keyring System Variables">Section 6.4.4.12, “Keyring System Variables”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_install_libdir"></a>
            <a class="indexterm" name="idm46444439334672"></a>

            <a class="indexterm" name="idm46444439333184"></a>

            <code class="literal">-DINSTALL_LIBDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install library files.
          </p></li><li class="listitem"><p><a name="option_cmake_install_mandir"></a>
            <a class="indexterm" name="idm46444439329104"></a>

            <a class="indexterm" name="idm46444439327616"></a>

            <code class="literal">-DINSTALL_MANDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install manual pages.
          </p></li><li class="listitem"><p><a name="option_cmake_install_mysqlkeyringdir"></a>
            <a class="indexterm" name="idm46444439323472"></a>

            <a class="indexterm" name="idm46444439322016"></a>

            <code class="literal">-DINSTALL_MYSQLKEYRINGDIR=<em class="replaceable"><code>dir_path</code></em></code>
          </p><p>
            The default directory to use as the location of the
            <code class="literal">keyring_file</code> plugin data file. The
            default value is platform specific and depends on the value
            of the <a class="link" href="installing.html#option_cmake_install_layout"><code class="option">INSTALL_LAYOUT</code></a>
            <span class="command"><strong>CMake</strong></span> option; see the description of the
            <a class="link" href="security.html#sysvar_keyring_file_data"><code class="literal">keyring_file_data</code></a> system
            variable in <a class="xref" href="server-administration.html#server-system-variables" title="5.1.8 Server System Variables">Section 5.1.8, “Server System Variables”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_install_mysqlsharedir"></a>
            <a class="indexterm" name="idm46444439313280"></a>

            <a class="indexterm" name="idm46444439311824"></a>

            <code class="literal">-DINSTALL_MYSQLSHAREDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install shared data files.
          </p></li><li class="listitem"><p><a name="option_cmake_install_mysqltestdir"></a>
            <a class="indexterm" name="idm46444439307584"></a>

            <a class="indexterm" name="idm46444439306128"></a>

            <code class="literal">-DINSTALL_MYSQLTESTDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install the <code class="filename">mysql-test</code>
            directory. To suppress installation of this directory,
            explicitly set the option to the empty value
            (<a class="link" href="installing.html#option_cmake_install_mysqltestdir"><code class="option">-DINSTALL_MYSQLTESTDIR=</code></a>).
          </p></li><li class="listitem"><p><a name="option_cmake_install_pkgconfigdir"></a>
            <a class="indexterm" name="idm46444439300096"></a>

            <a class="indexterm" name="idm46444439298640"></a>

            <code class="literal">-DINSTALL_PKGCONFIGDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The directory in which to install the
            <code class="filename">mysqlclient.pc</code> file for use by
            <span class="command"><strong>pkg-config</strong></span>. The default value is
            <code class="literal">INSTALL_LIBDIR/pkgconfig</code>, unless
            <a class="link" href="installing.html#option_cmake_install_libdir"><code class="option">INSTALL_LIBDIR</code></a> ends with
            <code class="literal">/mysql</code>, in which case that is removed
            first.
          </p></li><li class="listitem"><p><a name="option_cmake_install_plugindir"></a>
            <a class="indexterm" name="idm46444439290512"></a>

            <a class="indexterm" name="idm46444439289056"></a>

            <code class="literal">-DINSTALL_PLUGINDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The location of the plugin directory.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#sysvar_plugin_dir"><code class="option">--plugin_dir</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_install_priv_libdir"></a>
            <a class="indexterm" name="idm46444439283344"></a>

            <a class="indexterm" name="idm46444439281888"></a>

            <code class="literal">-DINSTALL_PRIV_LIBDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The location of the dynamic library directory.
          </p><p>
            Default locations: RPM =
            <code class="filename">/usr/lib64/mysql/private/</code>, DEB =
            <code class="filename">/usr/lib/mysql/private/</code>, and TAR =
            <code class="filename">lib/private/</code>.
          </p><p>
            This option was added in MySQL 8.0.18.
          </p><p>
            For Protobuf: Because this is a private location, loader
            (such as ld-linux.so on Linux) may not find the
            <code class="filename">libprotobuf.so</code> files without help. To
            guide loader, <code class="literal">RPATH</code> with value
            <span class="emphasis"><em>$ORIGIN/../$INSTALL_PRIV_LIBDIR</em></span> is
            added to mysqld and mysqlxtest. This works for most cases
            but when using the <a class="link" href="server-administration.html#resource-groups" title="5.1.15 Resource Groups">Resource
            Group</a> feature, <span class="emphasis"><em>mysqld</em></span> is
            <span class="emphasis"><em>setsuid</em></span> and then loader ignores
            <code class="literal">RPATH</code> which contains
            <code class="literal">$ORIGIN</code>. To overcome this, an explicit
            full path to the directory is set in DEB and RPM variants of
            mysqld, as the target destination is known. For tarball
            installs, patching of mysqld with a tool like
            <span class="command"><strong>patchelf</strong></span> is required.
          </p></li><li class="listitem"><p><a name="option_cmake_install_sbindir"></a>
            <a class="indexterm" name="idm46444439267792"></a>

            <a class="indexterm" name="idm46444439266304"></a>

            <code class="literal">-DINSTALL_SBINDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install the <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server.
          </p></li><li class="listitem"><p><a name="option_cmake_install_secure_file_privdir"></a>
            <a class="indexterm" name="idm46444439260960"></a>

            <a class="indexterm" name="idm46444439259456"></a>

            <code class="literal">-DINSTALL_SECURE_FILE_PRIVDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The default value for the
            <a class="link" href="server-administration.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a> system
            variable. The default value is platform specific and depends
            on the value of the
            <a class="link" href="installing.html#option_cmake_install_layout"><code class="option">INSTALL_LAYOUT</code></a>
            <span class="command"><strong>CMake</strong></span> option; see the description of the
            <a class="link" href="server-administration.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a> system
            variable in <a class="xref" href="server-administration.html#server-system-variables" title="5.1.8 Server System Variables">Section 5.1.8, “Server System Variables”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_install_sharedir"></a>
            <a class="indexterm" name="idm46444439250320"></a>

            <a class="indexterm" name="idm46444439248832"></a>

            <code class="literal">-DINSTALL_SHAREDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install <code class="filename">aclocal/mysql.m4</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_install_static_libraries"></a>
            <a class="indexterm" name="idm46444439243984"></a>

            <a class="indexterm" name="idm46444439242528"></a>

            <code class="literal">-DINSTALL_STATIC_LIBRARIES=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to install static libraries. The default is
            <code class="literal">ON</code>. If set to <code class="literal">OFF</code>,
            these libraries are not installed:
            <code class="filename">libmysqlclient.a</code>,
            <code class="filename">libmysqlservices.a</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_install_supportfilesdir"></a>
            <a class="indexterm" name="idm46444439235408"></a>

            <a class="indexterm" name="idm46444439233952"></a>

            <code class="literal">-DINSTALL_SUPPORTFILESDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Where to install extra support files.
          </p></li><li class="listitem"><p><a name="option_cmake_link_randomize"></a>
            <code class="literal">-DLINK_RANDOMIZE=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444439228672"></a><a class="indexterm" name="idm46444439227184"></a><p>
            Whether to randomize the order of symbols in the
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> binary. The default is
            <code class="literal">OFF</code>. This option should be enabled only
            for debugging purposes.
          </p></li><li class="listitem"><p><a name="option_cmake_link_randomize_seed"></a>
            <code class="literal">-DLINK_RANDOMIZE_SEED=<em class="replaceable"><code>val</code></em></code>
          </p><a class="indexterm" name="idm46444439221040"></a><a class="indexterm" name="idm46444439219536"></a><p>
            Seed value for the
            <a class="link" href="installing.html#option_cmake_link_randomize"><code class="option">LINK_RANDOMIZE</code></a> option. The
            value is a string. The default is <code class="literal">mysql</code>,
            an arbitrary choice.
          </p></li><li class="listitem"><p><a name="option_cmake_mysql_datadir"></a>
            <a class="indexterm" name="idm46444439214704"></a>

            <a class="indexterm" name="idm46444439213216"></a>

            <code class="literal">-DMYSQL_DATADIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The location of the MySQL data directory.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">--datadir</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_odbc_includes"></a>
            <a class="indexterm" name="idm46444439207616"></a>

            <a class="indexterm" name="idm46444439206128"></a>

            <code class="literal">-DODBC_INCLUDES=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The location of the ODBC includes directory, and may be used
            while configuring Connector/ODBC.
          </p></li><li class="listitem"><p><a name="option_cmake_odbc_lib_dir"></a>
            <a class="indexterm" name="idm46444439201968"></a>

            <a class="indexterm" name="idm46444439200480"></a>

            <code class="literal">-DODBC_LIB_DIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The location of the ODBC library directory, and may be used
            while configuring Connector/ODBC.
          </p></li><li class="listitem"><p><a name="option_cmake_sysconfdir"></a>
            <a class="indexterm" name="idm46444439196256"></a>

            <a class="indexterm" name="idm46444439194800"></a>

            <code class="literal">-DSYSCONFDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The default <code class="literal">my.cnf</code> option file directory.
          </p><p>
            This location cannot be set at server startup, but you can
            start the server with a given option file using the
            <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file=<em class="replaceable"><code>file_name</code></em></code></a>
            option, where <em class="replaceable"><code>file_name</code></em> is the
            full path name to the file.
          </p></li><li class="listitem"><p><a name="option_cmake_systemd_pid_dir"></a>
            <a class="indexterm" name="idm46444439187664"></a>

            <a class="indexterm" name="idm46444439186176"></a>

            <a class="indexterm" name="idm46444439184688"></a>

            <code class="literal">-DSYSTEMD_PID_DIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The name of the directory in which to create the PID file
            when MySQL is managed by systemd. The default is
            <code class="filename">/var/run/mysqld</code>; this might be changed
            implicitly according to the
            <a class="link" href="installing.html#option_cmake_install_layout"><code class="option">INSTALL_LAYOUT</code></a> value.
          </p><p>
            This option is ignored unless
            <a class="link" href="installing.html#option_cmake_with_systemd"><code class="option">WITH_SYSTEMD</code></a> is enabled.
          </p></li><li class="listitem"><p><a name="option_cmake_systemd_service_name"></a>
            <a class="indexterm" name="idm46444439177216"></a>

            <a class="indexterm" name="idm46444439175760"></a>

            <a class="indexterm" name="idm46444439174256"></a>

            <code class="literal">-DSYSTEMD_SERVICE_NAME=<em class="replaceable"><code>name</code></em></code>
          </p><p>
            The name of the MySQL service to use when MySQL is managed
            by systemd. The default is <code class="literal">mysqld</code>; this
            might be changed implicitly according to the
            <a class="link" href="installing.html#option_cmake_install_layout"><code class="option">INSTALL_LAYOUT</code></a> value.
          </p><p>
            This option is ignored unless
            <a class="link" href="installing.html#option_cmake_with_systemd"><code class="option">WITH_SYSTEMD</code></a> is enabled.
          </p></li><li class="listitem"><p><a name="option_cmake_tmpdir"></a>
            <a class="indexterm" name="idm46444439166768"></a>

            <a class="indexterm" name="idm46444439165312"></a>

            <code class="literal">-DTMPDIR=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The default location to use for the
            <a class="link" href="server-administration.html#sysvar_tmpdir"><code class="literal">tmpdir</code></a> system variable. If
            unspecified, the value defaults to
            <code class="literal">P_tmpdir</code> in
            <code class="literal">&lt;stdio.h&gt;</code>.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="option_cmake_storage_engine_options"></a>Storage Engine Options</h4>

</div>

</div>

</div>
<p>
        Storage engines are built as plugins. You can build a plugin as
        a static module (compiled into the server) or a dynamic module
        (built as a dynamic library that must be installed into the
        server using the <a class="link" href="sql-statements.html#install-plugin" title="13.7.4.4 INSTALL PLUGIN Statement"><code class="literal">INSTALL PLUGIN</code></a>
        statement or the <a class="link" href="server-administration.html#option_mysqld_plugin-load"><code class="option">--plugin-load</code></a>
        option before it can be used). Some plugins might not support
        static or dynamic building.
      </p><p>
        The <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a>,
        <a class="link" href="storage-engines.html#myisam-storage-engine" title="16.2 The MyISAM Storage Engine"><code class="literal">MyISAM</code></a>,
        <a class="link" href="storage-engines.html#merge-storage-engine" title="16.7 The MERGE Storage Engine"><code class="literal">MERGE</code></a>,
        <a class="link" href="storage-engines.html#memory-storage-engine" title="16.3 The MEMORY Storage Engine"><code class="literal">MEMORY</code></a>, and
        <a class="link" href="storage-engines.html#csv-storage-engine" title="16.4 The CSV Storage Engine"><code class="literal">CSV</code></a> engines are mandatory (always
        compiled into the server) and need not be installed explicitly.
      </p><p>
        To compile a storage engine statically into the server, use
        <code class="literal">-DWITH_<em class="replaceable"><code>engine</code></em>_STORAGE_ENGINE=1</code>.
        Some permissible <em class="replaceable"><code>engine</code></em> values are
        <code class="literal">ARCHIVE</code>, <code class="literal">BLACKHOLE</code>,
        <code class="literal">EXAMPLE</code>, <code class="literal">FEDERATED</code>, and
        <code class="literal">NDB</code> or <code class="literal">NDBCLUSTER</code>
        (<a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> support). Examples:
      </p><pre data-lang="ini" class="programlisting">-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          It is not possible to compile without Performance Schema
          support. If it is desired to compile without particular types
          of instrumentation, that can be done with the following
          <span class="command"><strong>CMake</strong></span> options:
        </p><pre data-lang="simple" class="programlisting">DISABLE_PSI_COND
DISABLE_PSI_DATA_LOCK
DISABLE_PSI_ERROR
DISABLE_PSI_FILE
DISABLE_PSI_IDLE
DISABLE_PSI_MEMORY
DISABLE_PSI_METADATA
DISABLE_PSI_MUTEX
DISABLE_PSI_PS
DISABLE_PSI_RWLOCK
DISABLE_PSI_SOCKET
DISABLE_PSI_SP
DISABLE_PSI_STAGE
DISABLE_PSI_STATEMENT
DISABLE_PSI_STATEMENT_DIGEST
DISABLE_PSI_TABLE
DISABLE_PSI_THREAD
DISABLE_PSI_TRANSACTION</pre><p>
          For example, to compile without mutex instrumentation,
          configure MySQL using the
          <code class="option">-DDISABLE_PSI_MUTEX=1</code> option.
</p>
</div>
<p>
        To exclude a storage engine from the build, use
        <code class="literal">-DWITH_<em class="replaceable"><code>engine</code></em>_STORAGE_ENGINE=0</code>.
        Examples:
      </p><pre data-lang="ini" class="programlisting">-DWITH_ARCHIVE_STORAGE_ENGINE=0
-DWITH_EXAMPLE_STORAGE_ENGINE=0
-DWITH_FEDERATED_STORAGE_ENGINE=0</pre><p>
        It is also possible to exclude a storage engine from the build
        using
        <code class="literal">-DWITHOUT_<em class="replaceable"><code>engine</code></em>_STORAGE_ENGINE=1</code>
        (but
        <code class="literal">-DWITH_<em class="replaceable"><code>engine</code></em>_STORAGE_ENGINE=0</code>
        is preferred). Examples:
      </p><pre data-lang="ini" class="programlisting">-DWITHOUT_ARCHIVE_STORAGE_ENGINE=1
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1</pre><p>
        If neither
        <code class="literal">-DWITH_<em class="replaceable"><code>engine</code></em>_STORAGE_ENGINE</code>
        nor
        <code class="literal">-DWITHOUT_<em class="replaceable"><code>engine</code></em>_STORAGE_ENGINE</code>
        are specified for a given storage engine, the engine is built as
        a shared module, or excluded if it cannot be built as a shared
        module.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="cmake-feature-options"></a>Feature Options</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_cmake_add_gdb_index"></a>
            <code class="literal">-DADD_GDB_INDEX=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444439122512"></a><a class="indexterm" name="idm46444439121024"></a><p>
            This option determines whether to enable generation of a
            <code class="literal">.gdb_index</code> section in binaries, which
            makes loading them in a debugger faster. The option is
            disabled by default. <span class="command"><strong>lld</strong></span> linker is used,
            and is disabled by It has no effect if a linker other than
            <span class="command"><strong>lld</strong></span> or GNU <span class="command"><strong>gold</strong></span> is
            used.
          </p><p>
            This option was added in MySQL 8.0.18.
          </p></li><li class="listitem"><p><a name="option_cmake_compilation_comment"></a>
            <a class="indexterm" name="idm46444439114480"></a>

            <a class="indexterm" name="idm46444439113024"></a>

            <code class="literal">-DCOMPILATION_COMMENT=<em class="replaceable"><code>string</code></em></code>
          </p><p>
            A descriptive comment about the compilation environment. As
            of MySQL 8.0.14, <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> uses
            <a class="link" href="installing.html#option_cmake_compilation_comment_server"><code class="option">COMPILATION_COMMENT_SERVER</code></a>.
            Other programs continue to use
            <a class="link" href="installing.html#option_cmake_compilation_comment"><code class="option">COMPILATION_COMMENT</code></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_compilation_comment_server"></a>
            <a class="indexterm" name="idm46444439105552"></a>

            <a class="indexterm" name="idm46444439104096"></a>

            <code class="literal">-DCOMPILATION_COMMENT_SERVER=<em class="replaceable"><code>string</code></em></code>
          </p><p>
            A descriptive comment about the compilation environment for
            use by <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> (for example, to set the
            <a class="link" href="server-administration.html#sysvar_version_comment"><code class="literal">version_comment</code></a> system
            variable). This option was added in MySQL 8.0.14. Prior to
            8.0.14, the server uses
            <a class="link" href="installing.html#option_cmake_compilation_comment"><code class="option">COMPILATION_COMMENT</code></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_default_charset"></a>
            <a class="indexterm" name="idm46444439096128"></a>

            <a class="indexterm" name="idm46444439094640"></a>

            <code class="literal">-DDEFAULT_CHARSET=<em class="replaceable"><code>charset_name</code></em></code>
          </p><p>
            The server character set. By default, MySQL uses the
            <code class="literal">utf8mb4</code> character set.
          </p><p>
            <em class="replaceable"><code>charset_name</code></em> may be one of
            <code class="literal">binary</code>, <code class="literal">armscii8</code>,
            <code class="literal">ascii</code>, <code class="literal">big5</code>,
            <code class="literal">cp1250</code>, <code class="literal">cp1251</code>,
            <code class="literal">cp1256</code>, <code class="literal">cp1257</code>,
            <code class="literal">cp850</code>, <code class="literal">cp852</code>,
            <code class="literal">cp866</code>, <code class="literal">cp932</code>,
            <code class="literal">dec8</code>, <code class="literal">eucjpms</code>,
            <code class="literal">euckr</code>, <code class="literal">gb2312</code>,
            <code class="literal">gbk</code>, <code class="literal">geostd8</code>,
            <code class="literal">greek</code>, <code class="literal">hebrew</code>,
            <code class="literal">hp8</code>, <code class="literal">keybcs2</code>,
            <code class="literal">koi8r</code>, <code class="literal">koi8u</code>,
            <code class="literal">latin1</code>, <code class="literal">latin2</code>,
            <code class="literal">latin5</code>, <code class="literal">latin7</code>,
            <code class="literal">macce</code>, <code class="literal">macroman</code>,
            <code class="literal">sjis</code>, <code class="literal">swe7</code>,
            <code class="literal">tis620</code>, <code class="literal">ucs2</code>,
            <code class="literal">ujis</code>, <code class="literal">utf8</code>,
            <code class="literal">utf8mb4</code>, <code class="literal">utf16</code>,
            <code class="literal">utf16le</code>, <code class="literal">utf32</code>. The
            permissible character sets are listed in the
            <code class="filename">cmake/character_sets.cmake</code> file as the
            value of <code class="literal">CHARSETS_AVAILABLE</code>.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#sysvar_character_set_server"><code class="option">--character_set_server</code></a>
            option.
          </p></li><li class="listitem"><p><a name="option_cmake_default_collation"></a>
            <a class="indexterm" name="idm46444439057552"></a>

            <a class="indexterm" name="idm46444439056096"></a>

            <code class="literal">-DDEFAULT_COLLATION=<em class="replaceable"><code>collation_name</code></em></code>
          </p><p>
            The server collation. By default, MySQL uses
            <code class="literal">utf8mb4_0900_ai_ci</code>. Use the
            <a class="link" href="sql-statements.html#show-collation" title="13.7.7.4 SHOW COLLATION Statement"><code class="literal">SHOW COLLATION</code></a> statement to
            determine which collations are available for each character
            set.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#sysvar_collation_server"><code class="option">--collation_server</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_cond"></a>
            <a class="indexterm" name="idm46444439048032"></a>

            <a class="indexterm" name="idm46444439046544"></a>

            <code class="literal">-DDISABLE_PSI_COND=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema condition
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_file"></a>
            <a class="indexterm" name="idm46444439041696"></a>

            <a class="indexterm" name="idm46444439040208"></a>

            <code class="literal">-DDISABLE_PSI_FILE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema file
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_idle"></a>
            <a class="indexterm" name="idm46444439035296"></a>

            <a class="indexterm" name="idm46444439033808"></a>

            <code class="literal">-DDISABLE_PSI_IDLE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema idle
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_memory"></a>
            <a class="indexterm" name="idm46444439028896"></a>

            <a class="indexterm" name="idm46444439027440"></a>

            <code class="literal">-DDISABLE_PSI_MEMORY=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema memory
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_metadata"></a>
            <a class="indexterm" name="idm46444439022528"></a>

            <a class="indexterm" name="idm46444439021072"></a>

            <code class="literal">-DDISABLE_PSI_METADATA=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema metadata
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_mutex"></a>
            <a class="indexterm" name="idm46444439016096"></a>

            <a class="indexterm" name="idm46444439014640"></a>

            <code class="literal">-DDISABLE_PSI_MUTEX=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema mutex
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_rwlock"></a>
            <a class="indexterm" name="idm46444439009664"></a>

            <a class="indexterm" name="idm46444439008208"></a>

            <code class="literal">-DDISABLE_PSI_RWLOCK=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema rwlock
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_socket"></a>
            <a class="indexterm" name="idm46444439003232"></a>

            <a class="indexterm" name="idm46444439001776"></a>

            <code class="literal">-DDISABLE_PSI_SOCKET=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema socket
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_sp"></a>
            <a class="indexterm" name="idm46444438996800"></a>

            <a class="indexterm" name="idm46444438995312"></a>

            <code class="literal">-DDISABLE_PSI_SP=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema stored program
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_stage"></a>
            <a class="indexterm" name="idm46444438990400"></a>

            <a class="indexterm" name="idm46444438988944"></a>

            <code class="literal">-DDISABLE_PSI_STAGE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema stage
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_statement"></a>
            <a class="indexterm" name="idm46444438983968"></a>

            <a class="indexterm" name="idm46444438982512"></a>

            <code class="literal">-DDISABLE_PSI_STATEMENT=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema statement
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_statement_digest"></a>
            <a class="indexterm" name="idm46444438977472"></a>

            <a class="indexterm" name="idm46444438975968"></a>

            <code class="literal">-DDISABLE_PSI_STATEMENT_DIGEST=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema statement_digest
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_table"></a>
            <a class="indexterm" name="idm46444438971040"></a>

            <a class="indexterm" name="idm46444438969584"></a>

            <code class="literal">-DDISABLE_PSI_TABLE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to exclude the Performance Schema table
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_shared"></a>
            <a class="indexterm" name="idm46444438964608"></a>

            <a class="indexterm" name="idm46444438963120"></a>

            <code class="literal">-DDISABLE_SHARED=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to disable building build shared libraries and
            compile position-dependent code. The default is
            <code class="literal">OFF</code> (compile position-independent code).
          </p><p>
            This option is unused and was removed in MySQL 8.0.18.
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_ps"></a>
            <a class="indexterm" name="idm46444438957680"></a>

            <a class="indexterm" name="idm46444438956192"></a>

            <code class="literal">-DDISABLE_PSI_PS=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Exclude the performance schema prepared statements instances
            instrumentation. The default is <code class="literal">OFF</code>
            (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_thread"></a>
            <a class="indexterm" name="idm46444438951280"></a>

            <a class="indexterm" name="idm46444438949824"></a>

            <code class="literal">-DDISABLE_PSI_THREAD=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Exclude the performance schema thread instrumentation. The
            default is <code class="literal">OFF</code> (include).
          </p><p>
            Only disable threads when building without any
            instrumentation, because other instrumentations have a
            dependency on threads.
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_transaction"></a>
            <a class="indexterm" name="idm46444438944304"></a>

            <a class="indexterm" name="idm46444438942848"></a>

            <code class="literal">-DDISABLE_PSI_TRANSACTION=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Exclude the performance schema transaction instrumentation.
            The default is <code class="literal">OFF</code> (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_data_lock"></a>
            <a class="indexterm" name="idm46444438937840"></a>

            <a class="indexterm" name="idm46444438936384"></a>

            <code class="literal">-DDISABLE_PSI_DATA_LOCK=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Exclude the performance schema data lock instrumentation.
            The default is <code class="literal">OFF</code> (include).
          </p></li><li class="listitem"><p><a name="option_cmake_disable_psi_error"></a>
            <a class="indexterm" name="idm46444438931488"></a>

            <a class="indexterm" name="idm46444438930032"></a>

            <code class="literal">-DDISABLE_PSI_ERROR=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Exclude the performance schema server error instrumentation.
            The default is <code class="literal">OFF</code> (include).
          </p></li><li class="listitem"><p><a name="option_cmake_download_boost"></a>
            <a class="indexterm" name="idm46444438925152"></a>

            <a class="indexterm" name="idm46444438923664"></a>

            <code class="literal">-DDOWNLOAD_BOOST=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to download the Boost library. The default is
            <code class="literal">OFF</code>.
          </p><p>
            See the <a class="link" href="installing.html#option_cmake_with_boost"><code class="option">WITH_BOOST</code></a> option for
            additional discussion about using Boost.
          </p></li><li class="listitem"><p><a name="option_cmake_download_boost_timeout"></a>
            <a class="indexterm" name="idm46444438917360"></a>

            <a class="indexterm" name="idm46444438915904"></a>

            <code class="literal">-DDOWNLOAD_BOOST_TIMEOUT=<em class="replaceable"><code>seconds</code></em></code>
          </p><p>
            The timeout in seconds for downloading the Boost library.
            The default is 600 seconds.
          </p><p>
            See the <a class="link" href="installing.html#option_cmake_with_boost"><code class="option">WITH_BOOST</code></a> option for
            additional discussion about using Boost.
          </p></li><li class="listitem"><p><a name="option_cmake_enable_downloads"></a>
            <a class="indexterm" name="idm46444438910160"></a>

            <a class="indexterm" name="idm46444438908672"></a>

            <a class="indexterm" name="idm46444438907184"></a>

            <code class="literal">-DENABLE_DOWNLOADS=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to download optional files. For example, with this
            option enabled, <span class="command"><strong>CMake</strong></span> downloads the
            Google Test distribution that is used by the test suite to
            run unit tests, or Ant and JUnit required for building GCS
            Java wrapper.
          </p></li><li class="listitem"><p><a name="option_cmake_enable_experimental_sysvars"></a>
            <a class="indexterm" name="idm46444438902416"></a>

            <a class="indexterm" name="idm46444438900960"></a>

            <a class="indexterm" name="idm46444438899456"></a>

            <code class="literal">-DENABLE_EXPERIMENTAL_SYSVARS=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable experimental <code class="literal">InnoDB</code>
            system variables. Experimental system variables are intended
            for those engaged in MySQL development, should only be used
            in a development or test environment, and may be removed
            without notice in a future MySQL release. For information
            about experimental system variables, refer to
            <code class="filename">/storage/innobase/handler/ha_innodb.cc</code>
            in the MySQL source tree. Experimental system variables can
            be identified by searching for
            <span class="quote">“<span class="quote">PLUGIN_VAR_EXPERIMENTAL</span>”</span>.
          </p></li><li class="listitem"><p><a name="option_cmake_enable_gcov"></a>
            <a class="indexterm" name="idm46444438893072"></a>

            <a class="indexterm" name="idm46444438891584"></a>

            <code class="literal">-DENABLE_GCOV=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to include gcov support (Linux only).
          </p></li><li class="listitem"><p><a name="option_cmake_enable_gprof"></a>
            <a class="indexterm" name="idm46444438887424"></a>

            <a class="indexterm" name="idm46444438885936"></a>

            <code class="literal">-DENABLE_GPROF=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable <code class="literal">gprof</code> (optimized Linux
            builds only).
          </p></li><li class="listitem"><p><a name="option_cmake_enabled_local_infile"></a>
            <a class="indexterm" name="idm46444438881120"></a>

            <a class="indexterm" name="idm46444438879664"></a>

            <code class="literal">-DENABLED_LOCAL_INFILE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            This option controls the compiled-in default
            <code class="literal">LOCAL</code> capability for the MySQL client
            library. Clients that make no explicit arrangements
            therefore have <code class="literal">LOCAL</code> capability disabled
            or enabled according to the
            <a class="link" href="installing.html#option_cmake_enabled_local_infile"><code class="option">ENABLED_LOCAL_INFILE</code></a> setting
            specified at MySQL build time.
          </p><p>
            By default, the client library in MySQL binary distributions
            is compiled with
            <a class="link" href="installing.html#option_cmake_enabled_local_infile"><code class="option">ENABLED_LOCAL_INFILE</code></a> disabled.
            If you compile MySQL from source, configure it with
            <a class="link" href="installing.html#option_cmake_enabled_local_infile"><code class="option">ENABLED_LOCAL_INFILE</code></a> disabled
            or enabled based on whether clients that make no explicit
            arrangements should have <code class="literal">LOCAL</code> capability
            disabled or enabled, respectively.
          </p><p>
            <a class="link" href="installing.html#option_cmake_enabled_local_infile"><code class="option">ENABLED_LOCAL_INFILE</code></a> controls
            the default for client-side <code class="literal">LOCAL</code>
            capability. For the server, the
            <a class="link" href="server-administration.html#sysvar_local_infile"><code class="literal">local_infile</code></a> system
            variable controls server-side <code class="literal">LOCAL</code>
            capability. To explicitly cause the server to refuse or
            permit <a class="link" href="sql-statements.html#load-data" title="13.2.7 LOAD DATA Statement"><code class="literal">LOAD DATA
            LOCAL</code></a> statements (regardless of how client
            programs and libraries are configured at build time or
            runtime), start <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with
            <a class="link" href="server-administration.html#sysvar_local_infile"><code class="literal">local_infile</code></a> disabled or
            enabled, respectively.
            <a class="link" href="server-administration.html#sysvar_local_infile"><code class="literal">local_infile</code></a> can also be
            set at runtime. See
            <a class="xref" href="security.html#load-data-local-security" title="6.1.6 Security Considerations for LOAD DATA LOCAL">Section 6.1.6, “Security Considerations for LOAD DATA LOCAL”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_enabled_profiling"></a>
            <a class="indexterm" name="idm46444438858976"></a>

            <a class="indexterm" name="idm46444438857520"></a>

            <code class="literal">-DENABLED_PROFILING=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable query profiling code (for the
            <a class="link" href="sql-statements.html#show-profile" title="13.7.7.30 SHOW PROFILE Statement"><code class="literal">SHOW PROFILE</code></a> and
            <a class="link" href="sql-statements.html#show-profiles" title="13.7.7.31 SHOW PROFILES Statement"><code class="literal">SHOW PROFILES</code></a> statements).
          </p></li><li class="listitem"><p><a name="option_cmake_force_unsupported_compiler"></a>
            <a class="indexterm" name="idm46444438850640"></a>

            <a class="indexterm" name="idm46444438849184"></a>

            <code class="literal">-DFORCE_UNSUPPORTED_COMPILER=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            By default, <span class="command"><strong>CMake</strong></span> checks for minimum
            versions of supported compilers: Visual Studio 2015
            (Windows); GCC 4.8 or Clang 3.4 (Linux); Developer Studio
            12.5 (Solaris server); Developer Studio 12.4 or GCC 4.8
            (Solaris client library); Clang 3.6 (macOS), Clang 3.4
            (FreeBSD). To disable this check, use
            <a class="link" href="installing.html#option_cmake_force_unsupported_compiler"><code class="option">-DFORCE_UNSUPPORTED_COMPILER=ON</code></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_fprofile_generate"></a>
            <code class="literal">-DFPROFILE_GENERATE=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438841808"></a><a class="indexterm" name="idm46444438840352"></a><p>
            Whether to generate profile guided optimization (PGO) data.
            This option is available for experimenting with PGO with
            GCC. See the <code class="filename">cmake/fprofile.cmake</code> file
            in a MySQL source distribution for information about using
            <a class="link" href="installing.html#option_cmake_fprofile_generate"><code class="option">FPROFILE_GENERATE</code></a> and
            <a class="link" href="installing.html#option_cmake_fprofile_use"><code class="option">FPROFILE_USE</code></a>. These options
            have been tested with GCC 8 and 9.
          </p><p></p><p>
            This option was added in MySQL 8.0.19.
          </p></li><li class="listitem"><p><a name="option_cmake_fprofile_use"></a>
            <code class="literal">-DFPROFILE_USE=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438832528"></a><a class="indexterm" name="idm46444438831040"></a><p>
            Whether to use profile guided optimization (PGO) data. This
            option is available for experimenting with PGO with GCC. See
            the <code class="filename">cmake/fprofile.cmake</code> file in a
            MySQL source distribution for information about using
            <a class="link" href="installing.html#option_cmake_fprofile_generate"><code class="option">FPROFILE_GENERATE</code></a> and
            <a class="link" href="installing.html#option_cmake_fprofile_use"><code class="option">FPROFILE_USE</code></a>. These options
            have been tested with GCC 8 and 9.
          </p><p>
            Enabling <a class="link" href="installing.html#option_cmake_fprofile_use"><code class="option">FPROFILE_USE</code></a> also
            enables <a class="link" href="installing.html#option_cmake_with_lto"><code class="option">WITH_LTO</code></a>.
          </p><p>
            This option was added in MySQL 8.0.19.
          </p></li><li class="listitem"><p><a name="option_cmake_ignore_aio_check"></a>
            <a class="indexterm" name="idm46444438822192"></a>

            <a class="indexterm" name="idm46444438820704"></a>

            <a class="indexterm" name="idm46444438819216"></a>

            <code class="literal">-DIGNORE_AIO_CHECK=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            If the
            <a class="link" href="installing.html#option_cmake_build_config"><code class="option">-DBUILD_CONFIG=mysql_release</code></a>
            option is given on Linux, the <code class="literal">libaio</code>
            library must be linked in by default. If you do not have
            <code class="literal">libaio</code> or do not want to install it, you
            can suppress the check for it by specifying
            <a class="link" href="installing.html#option_cmake_ignore_aio_check"><code class="option">-DIGNORE_AIO_CHECK=1</code></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_max_indexes"></a>
            <a class="indexterm" name="idm46444438811952"></a>

            <a class="indexterm" name="idm46444438810464"></a>

            <code class="literal">-DMAX_INDEXES=<em class="replaceable"><code>num</code></em></code>
          </p><p>
            The maximum number of indexes per table. The default is 64.
            The maximum is 255. Values smaller than 64 are ignored and
            the default of 64 is used.
          </p></li><li class="listitem"><p><a name="option_cmake_mysql_maintainer_mode"></a>
            <a class="indexterm" name="idm46444438806272"></a>

            <a class="indexterm" name="idm46444438804816"></a>

            <code class="literal">-DMYSQL_MAINTAINER_MODE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable a MySQL maintainer-specific development
            environment. If enabled, this option causes compiler
            warnings to become errors.
          </p></li><li class="listitem"><p><a name="option_cmake_mutex_type"></a>
            <a class="indexterm" name="idm46444438800496"></a>

            <a class="indexterm" name="idm46444438799040"></a>

            <code class="literal">-DMUTEX_TYPE=<em class="replaceable"><code>type</code></em></code>
          </p><p>
            The mutex type used by <code class="literal">InnoDB</code>. Options
            include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">event</code>: Use event mutexes. This is the
                default value and the original <code class="literal">InnoDB</code>
                mutex implementation.
              </p></li><li class="listitem"><p>
                <code class="literal">sys</code>: Use POSIX mutexes on UNIX
                systems. Use <code class="literal">CRITICAL_SECTION</code> onjects
                on Windows, if available.
              </p></li><li class="listitem"><p>
                <code class="literal">futex</code>: Use Linux futexes instead of
                condition variables to schedule waiting threads.
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_mysqlx_tcp_port"></a>
            <a class="indexterm" name="idm46444438787568"></a>

            <a class="indexterm" name="idm46444438786080"></a>

            <a class="indexterm" name="idm46444438784592"></a>

            <a class="indexterm" name="idm46444438783520"></a>

            <a class="indexterm" name="idm46444438782448"></a>

            <code class="literal">-DMYSQLX_TCP_PORT=<em class="replaceable"><code>port_num</code></em></code>
          </p><p>
            The port number on which X Plugin listens for TCP/IP
            connections. The default is 33060.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="document-store.html#sysvar_mysqlx_port"><code class="literal">mysqlx_port</code></a> system
            variable.
          </p></li><li class="listitem"><p><a name="option_cmake_mysqlx_unix_addr"></a>
            <a class="indexterm" name="idm46444438776832"></a>

            <a class="indexterm" name="idm46444438775344"></a>

            <code class="literal">-DMYSQLX_UNIX_ADDR=<em class="replaceable"><code>file_name</code></em></code>
          </p><p>
            The Unix socket file path on which the server listens for
            X Plugin socket connections. This must be an absolute path
            name. The default is <code class="filename">/tmp/mysqlx.sock</code>.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="document-store.html#sysvar_mysqlx_port"><code class="literal">mysqlx_port</code></a> system
            variable.
          </p></li><li class="listitem"><p><a name="option_cmake_mysql_project_name"></a>
            <a class="indexterm" name="idm46444438768608"></a>

            <a class="indexterm" name="idm46444438767152"></a>

            <code class="literal">-DMYSQL_PROJECT_NAME=<em class="replaceable"><code>name</code></em></code>
          </p><p>
            For Windows or macOS, the project name to incorporate into
            the project file name.
          </p></li><li class="listitem"><p><a name="option_cmake_mysql_tcp_port"></a>
            <a class="indexterm" name="idm46444438762880"></a>

            <a class="indexterm" name="idm46444438761392"></a>

            <a class="indexterm" name="idm46444438759904"></a>

            <a class="indexterm" name="idm46444438758832"></a>

            <a class="indexterm" name="idm46444438757760"></a>

            <code class="literal">-DMYSQL_TCP_PORT=<em class="replaceable"><code>port_num</code></em></code>
          </p><p>
            The port number on which the server listens for TCP/IP
            connections. The default is 3306.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#option_mysqld_port"><code class="option">--port</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_mysql_unix_addr"></a>
            <a class="indexterm" name="idm46444438752576"></a>

            <a class="indexterm" name="idm46444438751088"></a>

            <code class="literal">-DMYSQL_UNIX_ADDR=<em class="replaceable"><code>file_name</code></em></code>
          </p><p>
            The Unix socket file path on which the server listens for
            socket connections. This must be an absolute path name. The
            default is <code class="filename">/tmp/mysql.sock</code>.
          </p><p>
            This value can be set at server startup with the
            <a class="link" href="server-administration.html#option_mysqld_socket"><code class="option">--socket</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_optimizer_trace"></a>
            <a class="indexterm" name="idm46444438744672"></a>

            <a class="indexterm" name="idm46444438743184"></a>

            <code class="literal">-DOPTIMIZER_TRACE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to support optimizer tracing. See
            <a class="ulink" href="https://dev.mysql.com/doc/internals/en/optimizer-tracing.html" target="_top">MySQL
            Internals: Tracing the Optimizer</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_reproducible_build"></a>
            <code class="literal">-DREPRODUCIBLE_BUILD=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438737120"></a><a class="indexterm" name="idm46444438735664"></a><p>
            For builds on Linux systems, this option controls whether to
            take extra care to create a build result independent of
            build location and time.
          </p><p>
            This option was added in MySQL 8.0.11. As of MySQL 8.0.12,
            it defaults to <code class="literal">ON</code> for
            <code class="literal">RelWithDebInfo</code> builds.
          </p></li><li class="listitem"><p><a name="option_cmake_use_ld_gold"></a>
            <code class="literal">-DUSE_LD_GOLD=<em class="replaceable"><code>bool</code></em></code>

            <a class="indexterm" name="idm46444438729600"></a>

            <a class="indexterm" name="idm46444438728112"></a>
          </p><p>
            <span class="command"><strong>CMake</strong></span> causes the build process to link
            with the GNU <span class="command"><strong>gold</strong></span> linker if it is
            available and not explicitly disabled. To disable use of
            this linker, specify the
            <a class="link" href="installing.html#option_cmake_use_ld_gold"><code class="option">-DUSE_LD_GOLD=OFF</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_use_ld_lld"></a>
            <code class="literal">-DUSE_LD_LLD=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438721344"></a><a class="indexterm" name="idm46444438719856"></a><p>
            <span class="command"><strong>CMake</strong></span> causes the build process to link
            with the <span class="command"><strong>llvm</strong></span> <span class="command"><strong>lld</strong></span>
            linker for Clang if it is available and not explicitly
            disabled. To disable use of this linker, specify the
            <a class="link" href="installing.html#option_cmake_use_ld_lld"><code class="option">-DUSE_LD_LLD=OFF</code></a> option.
          </p><p>
            This option was added in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_cmake_win_debug_no_inline"></a>
            <a class="indexterm" name="idm46444438713200"></a>

            <a class="indexterm" name="idm46444438711744"></a>

            <code class="literal">-DWIN_DEBUG_NO_INLINE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to disable function inlining on Windows. The default
            is off (inlining enabled).
          </p></li><li class="listitem"><p><a name="option_cmake_with_ant"></a>
            <a class="indexterm" name="idm46444438707504"></a>

            <a class="indexterm" name="idm46444438706048"></a>

            <code class="literal">-DWITH_ANT=<em class="replaceable"><code>path_name</code></em></code>
          </p><p>
            Set the path to Ant, required when building GCS Java
            wrapper. Works in a similar way to the existing
            <a class="link" href="installing.html#option_cmake_with_boost"><code class="option">WITH_BOOST</code></a> CMake option. Set
            <a class="link" href="installing.html#option_cmake_with_ant"><code class="option">WITH_ANT</code></a> to the path of a
            directory where the Ant tarball, or an already unpacked
            archive, is saved. When
            <a class="link" href="installing.html#option_cmake_with_ant"><code class="option">WITH_ANT</code></a> is not set, or is set
            with the special value <code class="literal">system</code>, the build
            assumes a binary <span class="command"><strong>ant</strong></span> exists in
            <code class="literal">$PATH</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_asan"></a>
            <a class="indexterm" name="idm46444438696544"></a>

            <a class="indexterm" name="idm46444438695088"></a>

            <code class="literal">-DWITH_ASAN=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable the AddressSanitizer, for compilers that
            support it. The default is off.
          </p></li><li class="listitem"><p><a name="option_cmake_with_asan_scope"></a>
            <a class="indexterm" name="idm46444438690816"></a>

            <a class="indexterm" name="idm46444438689328"></a>

            <code class="literal">-DWITH_ASAN_SCOPE=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable the AddressSanitizer
            <code class="literal">-fsanitize-address-use-after-scope</code> Clang
            flag for use-after-scope detection. The default is off. To
            use this option, <code class="literal">-DWITH_ASAN</code>
            must also be enabled.
          </p></li><li class="listitem"><p><a name="option_cmake_with_authentication_ldap"></a>
            <code class="literal">-DWITH_AUTHENTICATION_LDAP=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438682304"></a><a class="indexterm" name="idm46444438680800"></a><a class="indexterm" name="idm46444438679296"></a><p>
            Whether to report an error if the LDAP authentication
            plugins cannot be built:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                If this option is disabled (the default), the LDAP
                plugins are built if the required header files and
                libraries are found. If they are not,
                <span class="command"><strong>CMake</strong></span> displays a note about it.
              </p></li><li class="listitem"><p>
                If this option is enabled, a failure to find the
                required header file andlibraries causes
                <span class="command"><strong>CMake</strong></span> to produce an error, preventing
                the server from being built.
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_with_authentication_pam"></a>
            <a class="indexterm" name="idm46444438672272"></a>

            <a class="indexterm" name="idm46444438670816"></a>

            <code class="literal">-DWITH_AUTHENTICATION_PAM=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to build the PAM authentication plugin, for source
            trees that include this plugin. (See
            <a class="xref" href="security.html#pam-pluggable-authentication" title="6.4.1.5 PAM Pluggable Authentication">Section 6.4.1.5, “PAM Pluggable Authentication”</a>.) If this
            option is specified and the plugin cannot be compiled, the
            build fails.
          </p></li><li class="listitem"><p><a name="option_cmake_with_aws_sdk"></a>
            <code class="literal">-DWITH_AWS_SDK=<em class="replaceable"><code>path_name</code></em></code>
          </p><a class="indexterm" name="idm46444438664560"></a><a class="indexterm" name="idm46444438663072"></a><p>
            The location of the Amazon Web Services software development
            kit.
          </p></li><li class="listitem"><p><a name="option_cmake_with_boost"></a>
            <a class="indexterm" name="idm46444438660048"></a>

            <a class="indexterm" name="idm46444438658592"></a>

            <code class="literal">-DWITH_BOOST=<em class="replaceable"><code>path_name</code></em></code>
          </p><p>
            The Boost library is required to build MySQL. These
            <span class="command"><strong>CMake</strong></span> options enable control over the
            library source location, and whether to download it
            automatically:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <a class="link" href="installing.html#option_cmake_with_boost"><code class="option">-DWITH_BOOST=<em class="replaceable"><code>path_name</code></em></code></a>
                specifies the Boost library directory location. It is
                also possible to specify the Boost location by setting
                the <code class="literal">BOOST_ROOT</code> or
                <code class="literal">WITH_BOOST</code> environment variable.
              </p><p>
                <a class="link" href="installing.html#option_cmake_with_boost"><code class="option">-DWITH_BOOST=system</code></a> is
                also permitted and indicates that the correct version of
                Boost is installed on the compilation host in the
                standard location. In this case, the installed version
                of Boost is used rather than any version included with a
                MySQL source distribution.
              </p></li><li class="listitem"><p>
                <a class="link" href="installing.html#option_cmake_download_boost"><code class="option">-DDOWNLOAD_BOOST=<em class="replaceable"><code>bool</code></em></code></a>
                specifies whether to download the Boost source if it is
                not present in the specified location. The default is
                <code class="literal">OFF</code>.
              </p></li><li class="listitem"><p>
                <a class="link" href="installing.html#option_cmake_download_boost_timeout"><code class="option">-DDOWNLOAD_BOOST_TIMEOUT=<em class="replaceable"><code>seconds</code></em></code></a>
                the timeout in seconds for downloading the Boost
                library. The default is 600 seconds.
</p></li></ul>
</div>
<p>
            For example, if you normally build MySQL placing the object
            output in the <code class="filename">bld</code> subdirectory of your
            MySQL source tree, you can build with Boost like this:
          </p><pre data-lang="terminal" class="programlisting">mkdir bld
cd bld
cmake .. -DDOWNLOAD_BOOST=ON -DWITH_BOOST=$HOME/my_boost</pre><p>
            This causes Boost to be downloaded into the
            <code class="filename">my_boost</code> directory under your home
            directory. If the required Boost version is already there,
            no download is done. If the required Boost version changes,
            the newer version is downloaded.
          </p><p>
            If Boost is already installed locally and your compiler
            finds the Boost header files on its own, it may not be
            necessary to specify the preceding <span class="command"><strong>CMake</strong></span>
            options. However, if the version of Boost required by MySQL
            changes and the locally installed version has not been
            upgraded, you may have build problems. Using the
            <span class="command"><strong>CMake</strong></span> options should give you a
            successful build.
          </p><p>
            With the above settings that allow Boost download into a
            specified location, when the required Boost version changes,
            you need to remove the <code class="literal">bld</code> folder,
            recreate it, and perform the <span class="command"><strong>cmake</strong></span> step
            again. Otherwise, the new Boost version might not get
            downloaded, and compilation might fail.
          </p></li><li class="listitem"><p><a name="option_cmake_with_client_protocol_tracing"></a>
            <a class="indexterm" name="idm46444438634736"></a>

            <a class="indexterm" name="idm46444438633232"></a>

            <code class="literal">-DWITH_CLIENT_PROTOCOL_TRACING=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to build the client-side protocol tracing framework
            into the client library. By default, this option is enabled.
          </p><p>
            For information about writing protocol trace client plugins,
            see <a class="xref" href="extending-mysql.html#writing-protocol-trace-plugins" title="29.2.4.11 Writing Protocol Trace Plugins">Section 29.2.4.11, “Writing Protocol Trace Plugins”</a>.
          </p><p>
            See also the
            <a class="link" href="installing.html#option_cmake_with_test_trace_plugin"><code class="option">WITH_TEST_TRACE_PLUGIN</code></a> option.
          </p></li><li class="listitem"><p><a name="option_cmake_with_curl"></a>
            <code class="literal">-DWITH_CURL=<em class="replaceable"><code>curl_type</code></em></code>
          </p><a class="indexterm" name="idm46444438625152"></a><a class="indexterm" name="idm46444438623664"></a><p>
            The location of the <span class="command"><strong>curl</strong></span> library.
            <em class="replaceable"><code>curl_type</code></em> can be
            <code class="literal">system</code> (use the system
            <span class="command"><strong>curl</strong></span> library) or a path name to the
            <span class="command"><strong>curl</strong></span> library.
          </p></li><li class="listitem"><p><a name="option_cmake_with_debug"></a>
            <a class="indexterm" name="idm46444438617312"></a>

            <a class="indexterm" name="idm46444438615856"></a>

            <code class="literal">-DWITH_DEBUG=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to include debugging support.
          </p><p>
            Configuring MySQL with debugging support enables you to use
            the <a class="link" href="server-administration.html#option_mysqld_debug"><code class="option">--debug="d,parser_debug"</code></a>
            option when you start the server. This causes the Bison
            parser that is used to process SQL statements to dump a
            parser trace to the server's standard error output.
            Typically, this output is written to the error log.
          </p><p>
            Sync debug checking for the <code class="literal">InnoDB</code>
            storage engine is defined under
            <code class="literal">UNIV_DEBUG</code> and is available when
            debugging support is compiled in using the
            <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">WITH_DEBUG</code></a> option. When
            debugging support is compiled in, the
            <a class="link" href="innodb-storage-engine.html#sysvar_innodb_sync_debug"><code class="literal">innodb_sync_debug</code></a>
            configuration option can be used to enable or disable
            <code class="literal">InnoDB</code> sync debug checking.
          </p><p>
            Enabling <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">WITH_DEBUG</code></a> also
            enables Debug Sync. This facility is used for testing and
            debugging. When compiled in, Debug Sync is disabled by
            default at runtime. To enable it, start
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with the
            <a class="link" href="server-administration.html#option_mysqld_debug-sync-timeout"><code class="option">--debug-sync-timeout=<em class="replaceable"><code>N</code></em></code></a>
            option, where <em class="replaceable"><code>N</code></em> is a timeout
            value greater than 0. (The default value is 0, which
            disables Debug Sync.) <em class="replaceable"><code>N</code></em> becomes
            the default timeout for individual synchronization points.
          </p><p>
            Sync debug checking for the <code class="literal">InnoDB</code>
            storage engine is available when debugging support is
            compiled in using the
            <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">WITH_DEBUG</code></a> option.
          </p><p>
            For a description of the Debug Sync facility and how to use
            synchronization points, see
            <a class="ulink" href="https://dev.mysql.com/doc/internals/en/test-synchronization.html" target="_top">MySQL
            Internals: Test Synchronization</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_default_feature_set"></a>
            <a class="indexterm" name="idm46444438595904"></a>

            <a class="indexterm" name="idm46444438594448"></a>

            <code class="literal">-DWITH_DEFAULT_FEATURE_SET=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to use the flags from
            <code class="filename">cmake/build_configurations/feature_set.cmake</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_editline"></a>
            <a class="indexterm" name="idm46444438589472"></a>

            <a class="indexterm" name="idm46444438587984"></a>

            <code class="literal">-DWITH_EDITLINE=<em class="replaceable"><code>value</code></em></code>
          </p><p>
            Which <code class="literal">libedit</code>/<code class="literal">editline</code>
            library to use. The permitted values are
            <code class="literal">bundled</code> (the default) and
            <code class="literal">system</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_icu"></a>
            <code class="literal">-DWITH_ICU={<em class="replaceable"><code>icu_type</code></em>|<em class="replaceable"><code>path_name</code></em>}</code>
          </p><a class="indexterm" name="idm46444438579392"></a><a class="indexterm" name="idm46444438577904"></a><p>
            MySQL uses International Components for Unicode (ICU) to
            support regular expression operations. The
            <code class="option">WITH_ICU</code> option indicates the type of ICU
            support to include or the path name to the ICU installation
            to use.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <em class="replaceable"><code>icu_type</code></em> can be one of the
                following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; "><li class="listitem"><p>
                    <code class="literal">bundled</code>: Use the ICU library
                    bundled with the distribution. This is the default,
                    and is the only supported option for Windows.
                  </p></li><li class="listitem"><p>
                    <code class="literal">system</code>: Use the system ICU
                    library.
</p></li></ul>
</div>
</li><li class="listitem"><p>
                <em class="replaceable"><code>path_name</code></em> is the path name to
                the ICU installation to use. This can be preferable to
                using the <em class="replaceable"><code>icu_type</code></em> value of
                <code class="literal">system</code> because it can prevent CMake
                from detecting and using an older or incorrect ICU
                version installed on the system. (Another permitted way
                to do the same thing is to set <code class="option">WITH_ICU</code>
                to <code class="literal">system</code> and set the
                <code class="option">CMAKE_PREFIX_PATH</code> option to
                <em class="replaceable"><code>path_name</code></em>.)
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_with_innodb_extra_debug"></a>
            <a class="indexterm" name="idm46444438564128"></a>

            <a class="indexterm" name="idm46444438562672"></a>

            <code class="literal">-DWITH_INNODB_EXTRA_DEBUG=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to include extra InnoDB debugging support.
          </p><p>
            Enabling <code class="literal">WITH_INNODB_EXTRA_DEBUG</code> turns on
            extra InnoDB debug checks. This option can only be enabled
            when <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">WITH_DEBUG</code></a> is enabled.
          </p></li><li class="listitem"><p><a name="option_cmake_with_gmock"></a>
            <a class="indexterm" name="idm46444438556288"></a>

            <a class="indexterm" name="idm46444438554832"></a>

            <code class="literal">-DWITH_GMOCK=<em class="replaceable"><code>path_name</code></em></code>
          </p><p>
            The path to the googlemock distribution, for use with Google
            Test-based unit tests. The option value is the path to the
            distribution Zip file. Alternatively, set the
            <code class="literal">WITH_GMOCK</code> environment variable to the
            path name. It is also possible to use
            <code class="option">-DENABLE_DOWNLOADS=1</code> and
            <span class="command"><strong>CMake</strong></span> will download the distribution from
            GitHub.
          </p><p>
            If you build MySQL without the Google Test-based unit tests
            (by configuring wihout
            <a class="link" href="installing.html#option_cmake_with_gmock"><code class="option">WITH_GMOCK</code></a>),
            <span class="command"><strong>CMake</strong></span> displays a message indicating how
            to download it.
          </p></li><li class="listitem"><p><a name="option_cmake_with_innodb_memcached"></a>
            <a class="indexterm" name="idm46444438546192"></a>

            <a class="indexterm" name="idm46444438544736"></a>

            <code class="literal">-DWITH_INNODB_MEMCACHED=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to generate memcached shared libraries
            (<code class="filename">libmemcached.so</code> and
            <code class="filename">innodb_engine.so</code>).
          </p></li><li class="listitem"><p><a name="option_cmake_with_jemalloc"></a>
            <code class="literal">-DWITH_JEMALLOC=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438538000"></a><a class="indexterm" name="idm46444438536512"></a><p>
            Whether to link with <code class="option">-ljemalloc</code>. If
            enabled, built-in <code class="literal">malloc()</code>,
            <code class="literal">calloc()</code>, <code class="literal">realloc()</code>,
            and <code class="literal">free()</code> routines are disabled. The
            default is <code class="literal">OFF</code>.
          </p><p>
            This option was added in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_cmake_with_keyring_test"></a>
            <a class="indexterm" name="idm46444438528992"></a>

            <a class="indexterm" name="idm46444438527536"></a>

            <code class="literal">-DWITH_KEYRING_TEST=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to build the test program that accompanies the
            <code class="literal">keyring_file</code> plugin. The default is
            <code class="literal">OFF</code>. Test file source code is located in
            the <code class="filename">plugin/keyring/keyring-test</code>
            directory.
          </p></li><li class="listitem"><p><a name="option_cmake_with_libevent"></a>
            <a class="indexterm" name="idm46444438521152"></a>

            <a class="indexterm" name="idm46444438519664"></a>

            <code class="literal">-DWITH_LIBEVENT=<em class="replaceable"><code>string</code></em></code>
          </p><p>
            Which <code class="literal">libevent</code> library to use. Permitted
            values are <code class="literal">bundled</code> (default),
            <code class="literal">system</code>, and <code class="literal">yes</code>. If
            you specify <code class="literal">system</code> or
            <code class="literal">yes</code>, the system
            <code class="literal">libevent</code> library is used if present. If
            the system library is not found, the bundled
            <code class="literal">libevent</code> library is used. The
            <code class="literal">libevent</code> library is required by
            <code class="literal">InnoDB</code> memcached.
          </p></li><li class="listitem"><p><a name="option_cmake_with_libwrap"></a>
            <a class="indexterm" name="idm46444438508240"></a>

            <a class="indexterm" name="idm46444438506752"></a>

            <code class="literal">-DWITH_LIBWRAP=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to include <code class="literal">libwrap</code> (TCP wrappers)
            support.
          </p></li><li class="listitem"><p><a name="option_cmake_with_lock_order"></a>
            <code class="literal">-DWITH_LOCK_ORDER=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438500768"></a><a class="indexterm" name="idm46444438499280"></a><p>
            Whether to enable LOCK_ORDER tooling. By default, this
            option is disabled and server builds contain no tooling. If
            tooling is enabled, the LOCK_ORDER tool is available and can
            be used as described in <a class="xref" href="extending-mysql.html#lock-order-tool" title="29.5.3 The LOCK_ORDER Tool">Section 29.5.3, “The LOCK_ORDER Tool”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              With the <a class="link" href="installing.html#option_cmake_with_lock_order"><code class="option">WITH_LOCK_ORDER</code></a>
              option enabled, MySQL builds require the
              <span class="command"><strong>flex</strong></span> program.
</p>
</div>
<p>
            This option was added in MySQL 8.0.17.
          </p></li><li class="listitem"><p><a name="option_cmake_with_lsan"></a>
            <code class="literal">-DWITH_LSAN=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438491200"></a><a class="indexterm" name="idm46444438489712"></a><p>
            Whether to run LeakSanitizer, without AddressSanitizer. The
            default is <code class="literal">OFF</code>.
          </p><p>
            This option was added in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_cmake_with_lto"></a>
            <code class="literal">-DWITH_LTO=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438484400"></a><a class="indexterm" name="idm46444438482912"></a><p>
            Whether to enable the link-time optimizer, if the compiler
            supports it. The default is <code class="literal">OFF</code> unless
            <a class="link" href="installing.html#option_cmake_fprofile_use"><code class="option">FPROFILE_USE</code></a> is enabled.
          </p><p>
            This option was added in MySQL 8.0.13.
          </p></li><li class="listitem"><p><a name="option_cmake_with_lz4"></a>
            <a class="indexterm" name="idm46444438477664"></a>

            <a class="indexterm" name="idm46444438476208"></a>

            <code class="literal">-DWITH_LZ4=<em class="replaceable"><code>lz4_type</code></em></code>
          </p><p>
            The <a class="link" href="installing.html#option_cmake_with_lz4"><code class="option">WITH_LZ4</code></a> indicates the
            source of <code class="literal">zlib</code> support:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the
                <code class="literal">lz4</code> library bundled with the
                distribution. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the system
                <code class="literal">lz4</code> library. If
                <a class="link" href="installing.html#option_cmake_with_lz4"><code class="option">WITH_LZ4</code></a> is set to this
                value, the <a class="link" href="programs.html#lz4-decompress" title="4.8.1 lz4_decompress — Decompress mysqlpump LZ4-Compressed Output"><span class="command"><strong>lz4_decompress</strong></span></a> utility is
                not built. In this case, the system
                <span class="command"><strong>lz4</strong></span> command can be used instead.
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_with_msan"></a>
            <a class="indexterm" name="idm46444438462416"></a>

            <a class="indexterm" name="idm46444438460960"></a>

            <code class="literal">-DWITH_MSAN=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable MemorySanitizer, for compilers that
            support it. The default is off.
          </p><p>
            For this option to have an effect if enabled, all libraries
            linked to MySQL must also have been compiled with the option
            enabled.
          </p></li><li class="listitem"><p><a name="option_cmake_with_mecab"></a>
            <a class="indexterm" name="idm46444438456160"></a>

            <a class="indexterm" name="idm46444438454704"></a>

            <code class="literal">-DWITH_MECAB={disabled|system|<em class="replaceable"><code>path_name</code></em>}</code>
          </p><p>
            Use this option to compile the MeCab parser. If you have
            installed MeCab to its default installation directory, set
            <code class="literal">-DWITH_MECAB=system</code>. The
            <code class="literal">system</code> option applies to MeCab
            installations performed from source or from binaries using a
            native package management utility. If you installed MeCab to
            a custom installation directory, specify the path to the
            MeCab installation. For example,
            <code class="literal">-DWITH_MECAB=/opt/mecab</code>. If the
            <code class="literal">system</code> option does not work, specifying
            the MeCab installation path should work in all cases.
          </p><p>
            For related information, see
            <a class="xref" href="functions.html#fulltext-search-mecab" title="12.9.9 MeCab Full-Text Parser Plugin">Section 12.9.9, “MeCab Full-Text Parser Plugin”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_mscrt_debug"></a>
            <a class="indexterm" name="idm46444438445760"></a>

            <a class="indexterm" name="idm46444438444272"></a>

            <code class="literal">-DWITH_MSCRT_DEBUG=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable Visual Studio CRT memory leak tracing. The
            default is <code class="literal">OFF</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_mysqlx"></a>
            <a class="indexterm" name="idm46444438439392"></a>

            <a class="indexterm" name="idm46444438437904"></a>

            <code class="literal">-DWITH_MYSQLX=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to build with support for X Plugin. Default
            <code class="literal">ON</code>. See <a class="xref" href="document-store.html" title="Chapter 20 Using MySQL as a Document Store">Chapter 20, <i>Using MySQL as a Document Store</i></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_numa"></a>
            <a class="indexterm" name="idm46444438432304"></a>

            <a class="indexterm" name="idm46444438430848"></a>

            <code class="literal">-DWITH_NUMA=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Explicitly set the NUMA memory allocation policy.
            <span class="command"><strong>CMake</strong></span> sets the default
            <a class="link" href="installing.html#option_cmake_with_numa"><code class="option">WITH_NUMA</code></a> value based on
            whether the current platform has <code class="literal">NUMA</code>
            support. For platforms without NUMA support,
            <span class="command"><strong>CMake</strong></span> behaves as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                With no NUMA option (the normal case),
                <span class="command"><strong>CMake</strong></span> continues normally, producing
                only this warning: NUMA library missing or required
                version not available
              </p></li><li class="listitem"><p>
                With <a class="link" href="installing.html#option_cmake_with_numa"><code class="option">-DWITH_NUMA=ON</code></a>,
                <span class="command"><strong>CMake</strong></span> aborts with this error: NUMA
                library missing or required version not available
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_with_protobuf"></a>
            <a class="indexterm" name="idm46444438418704"></a>

            <a class="indexterm" name="idm46444438417216"></a>

            <code class="literal">-DWITH_PROTOBUF=<em class="replaceable"><code>protobuf_type</code></em></code>
          </p><p>
            Which Protocol Buffers package to use.
            <em class="replaceable"><code>protobuf_type</code></em> can be one of the
            following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the package bundled with
                the distribution. This is the default. Optionally use
                <a class="link" href="installing.html#option_cmake_install_priv_libdir"><code class="option">INSTALL_PRIV_LIBDIR</code></a> to
                modify the dynamic Protobuf library directory.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the package installed on
                the system.
</p></li></ul>
</div>
<p>
            Other values are ignored, with a fallback to
            <code class="literal">bundled</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_rapid"></a>
            <a class="indexterm" name="idm46444438406672"></a>

            <a class="indexterm" name="idm46444438405216"></a>

            <code class="literal">-DWITH_RAPID=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to build the rapid development cycle plugins. When
            enabled, a <code class="filename">rapid</code> directory is created
            in the build tree containing these plugins. When disabled,
            no <code class="filename">rapid</code> directory is created in the
            build tree. The default is <code class="literal">ON</code>, unless the
            <code class="filename">rapid</code> directory is removed from the
            source tree, in which case the default becomes
            <code class="literal">OFF</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_rapidjson"></a>
            <code class="literal">-DWITH_RAPIDJSON=<em class="replaceable"><code>rapidjson_type</code></em></code>
          </p><a class="indexterm" name="idm46444438396144"></a><a class="indexterm" name="idm46444438394656"></a><p>
            The type of RapidJSON library support to include.
            <em class="replaceable"><code>rapidjson_type</code></em> can be one of the
            following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the RapidJSON library
                bundled with the distribution. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the system RapidJSON
                library. Version 1.1.0 or higher is required.
</p></li></ul>
</div>
<p>
            This option was added in MySQL 8.0.13.
          </p></li><li class="listitem"><p><a name="option_cmake_with_lzma"></a>
            <code class="literal">-DWITH_LZMA=<em class="replaceable"><code>lzma_type</code></em></code>
          </p><a class="indexterm" name="idm46444438386016"></a><a class="indexterm" name="idm46444438384528"></a><p>
            The type of LZMA library support to include.
            <em class="replaceable"><code>lzma_type</code></em> can be one of the
            following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the LZMA library bundled
                with the distribution. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the system LZMA library.
</p></li></ul>
</div>
<p>
            This option was removed in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_cmake_with_re2"></a>
            <code class="literal">-DWITH_RE2=<em class="replaceable"><code>re2_type</code></em></code>
          </p><a class="indexterm" name="idm46444438375952"></a><a class="indexterm" name="idm46444438374464"></a><p>
            The type of RE2 library support to include.
            <em class="replaceable"><code>re2_type</code></em> can be one of the
            following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the RE2 library bundled
                with the distribution. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the system RE2 library.
</p></li></ul>
</div>
<p>
            As of MySQL 8.0.18, MySQL no longer uses the RE2 library and
            this option was removed.
          </p></li><li class="listitem"><p><a name="option_cmake_with_router"></a>
            <code class="literal">-DWITH_ROUTER=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438365856"></a><a class="indexterm" name="idm46444438364368"></a><p>
            Whether to build MySQL Router. The default is
            <code class="literal">ON</code>.
          </p><p>
            This option was added in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ssl"></a>
            <a class="indexterm" name="idm46444438360160"></a>

            <a class="indexterm" name="idm46444438358704"></a>

            <code class="literal">-DWITH_SSL={<em class="replaceable"><code>ssl_type</code></em></code>|<em class="replaceable"><code>path_name</code></em>}
          </p><p>
            For support of encrypted connections, entropy for random
            number generation, and other encryption-related operations,
            MySQL must be built using an SSL library. This option
            specifies which SSL library to use.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <em class="replaceable"><code>ssl_type</code></em> can be one of the
                following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; "><li class="listitem"><p>
                    <code class="literal">system</code>: Use the system OpenSSL
                    library. This is the default.
                  </p><p>
                    On macOS and Windows, using
                    <code class="literal">system</code> configures MySQL to build
                    as if CMake was invoked with
                    <em class="replaceable"><code>path_name</code></em> points to a
                    manually installed OpenSSL library. This is because
                    they do not have system SSL libraries. On macOS,
                    <span class="emphasis"><em>brew install openssl</em></span> installs
                    to <code class="filename">/usr/local/opt/openssl</code> and
                    <code class="literal">system</code> will find it. On Windows,
                    it checks
                    <span class="emphasis"><em>%ProgramFiles%/OpenSSL</em></span>,
                    <span class="emphasis"><em>%ProgramFiles%/OpenSSL-Win32</em></span>,
                    <span class="emphasis"><em>%ProgramFiles%/OpenSSL-Win64</em></span>,
                    <span class="emphasis"><em>C:/OpenSSL</em></span>,
                    <span class="emphasis"><em>C:/OpenSSL-Win32</em></span>, and
                    <span class="emphasis"><em>C:/OpenSSL-Win64</em></span>.
                  </p></li><li class="listitem"><p>
                    <code class="literal">yes</code>: This is a synonym for
                    <code class="literal">system</code>.
</p></li></ul>
</div>
</li><li class="listitem"><p>
                <em class="replaceable"><code>path_name</code></em> is the path name to
                the OpenSSL installation to use. This can be preferable
                to using the <em class="replaceable"><code>ssl_type</code></em> value
                of <code class="literal">system</code> because it can prevent
                CMake from detecting and using an older or incorrect
                OpenSSL version installed on the system. (Another
                permitted way to do the same thing is to set
                <code class="option">WITH_SSL</code> to <code class="literal">system</code>
                and set the <code class="option">CMAKE_PREFIX_PATH</code> option to
                <em class="replaceable"><code>path_name</code></em>.)
</p></li></ul>
</div>
<p>
            For additional information about configuring the SSL
            library, see
            <a class="xref" href="installing.html#source-ssl-library-configuration" title="2.9.6 Configuring SSL Library Support">Section 2.9.6, “Configuring SSL Library Support”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_systemd"></a>
            <a class="indexterm" name="idm46444438335456"></a>

            <a class="indexterm" name="idm46444438333968"></a>

            <a class="indexterm" name="idm46444438332480"></a>

            <code class="literal">-DWITH_SYSTEMD=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable installation of systemd support files. By
            default, this option is disabled. When enabled, systemd
            support files are installed, and scripts such as
            <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> and the System V
            initialization script are not installed. On platforms where
            systemd is not available, enabling
            <a class="link" href="installing.html#option_cmake_with_systemd"><code class="option">WITH_SYSTEMD</code></a> results in an
            error from <span class="command"><strong>CMake</strong></span>.
          </p><p>
            For more information about using systemd, see
            <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a>. That section also includes
            information about specifying options previously specified in
            <code class="literal">[mysqld_safe]</code> option groups. Because
            <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> is not installed when systemd
            is used, such options must be specified another way.
          </p></li><li class="listitem"><p><a name="option_cmake_with_system_libs"></a>
            <code class="literal">-DWITH_SYSTEM_LIBS=<em class="replaceable"><code>bool</code></em></code>
          </p><a class="indexterm" name="idm46444438320672"></a><a class="indexterm" name="idm46444438319184"></a><p>
            This option serves as an <span class="quote">“<span class="quote">umbrella</span>”</span> option to
            set the <code class="literal">system</code> value of any of the
            following <span class="command"><strong>CMake</strong></span> options that are not set
            explicitly: <a class="link" href="installing.html#option_cmake_with_curl"><code class="option">WITH_CURL</code></a>,
            <a class="link" href="installing.html#option_cmake_with_editline"><code class="option">WITH_EDITLINE</code></a>,
            <a class="link" href="installing.html#option_cmake_with_icu"><code class="option">WITH_ICU</code></a>,
            <a class="link" href="installing.html#option_cmake_with_libevent"><code class="option">WITH_LIBEVENT</code></a>,
            <a class="link" href="installing.html#option_cmake_with_lz4"><code class="option">WITH_LZ4</code></a>,
            <a class="link" href="installing.html#option_cmake_with_lzma"><code class="option">WITH_LZMA</code></a>,
            <a class="link" href="installing.html#option_cmake_with_protobuf"><code class="option">WITH_PROTOBUF</code></a>,
            <a class="link" href="installing.html#option_cmake_with_re2"><code class="option">WITH_RE2</code></a>,
            <a class="link" href="installing.html#option_cmake_with_ssl"><code class="option">WITH_SSL</code></a>,
            <a class="link" href="installing.html#option_cmake_with_zlib"><code class="option">WITH_ZLIB</code></a>,
            <a class="link" href="installing.html#option_cmake_with_zstd"><code class="option">WITH_ZSTD</code></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_test_trace_plugin"></a>
            <a class="indexterm" name="idm46444438303600"></a>

            <a class="indexterm" name="idm46444438302144"></a>

            <code class="literal">-DWITH_TEST_TRACE_PLUGIN=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to build the test protocol trace client plugin (see
            <a class="xref" href="extending-mysql.html#test-protocol-trace-plugin" title="29.2.4.11.1 Using the Test Protocol Trace Plugin">Section 29.2.4.11.1, “Using the Test Protocol Trace Plugin”</a>). By default,
            this option is disabled. Enabling this option has no effect
            unless the
            <a class="link" href="installing.html#option_cmake_with_client_protocol_tracing"><code class="option">WITH_CLIENT_PROTOCOL_TRACING</code></a>
            option is enabled. If MySQL is configured with both options
            enabled, the <code class="literal">libmysqlclient</code> client
            library is built with the test protocol trace plugin built
            in, and all the standard MySQL clients load the plugin.
            However, even when the test plugin is enabled, it has no
            effect by default. Control over the plugin is afforded using
            environment variables; see
            <a class="xref" href="extending-mysql.html#test-protocol-trace-plugin" title="29.2.4.11.1 Using the Test Protocol Trace Plugin">Section 29.2.4.11.1, “Using the Test Protocol Trace Plugin”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              Do <span class="emphasis"><em>not</em></span> enable the
              <a class="link" href="installing.html#option_cmake_with_test_trace_plugin"><code class="option">WITH_TEST_TRACE_PLUGIN</code></a>
              option if you want to use your own protocol trace plugins
              because only one such plugin can be loaded at a time and
              an error occurs for attempts to load a second one. If you
              have already built MySQL with the test protocol trace
              plugin enabled to see how it works, you must rebuild MySQL
              without it before you can use your own plugins.
</p>
</div>
<p>
            For information about writing trace plugins, see
            <a class="xref" href="extending-mysql.html#writing-protocol-trace-plugins" title="29.2.4.11 Writing Protocol Trace Plugins">Section 29.2.4.11, “Writing Protocol Trace Plugins”</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_tsan"></a>
            <a class="indexterm" name="idm46444438290256"></a>

            <a class="indexterm" name="idm46444438288800"></a>

            <code class="literal">-DWITH_TSAN=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable the ThreadSanitizer, for compilers that
            support it. The default is off.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ubsan"></a>
            <a class="indexterm" name="idm46444438284576"></a>

            <a class="indexterm" name="idm46444438283120"></a>

            <code class="literal">-DWITH_UBSAN=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to enable the Undefined Behavior Sanitizer, for
            compilers that support it. The default is off.
          </p></li><li class="listitem"><p><a name="option_cmake_with_unit_tests"></a>
            <a class="indexterm" name="idm46444438278880"></a>

            <a class="indexterm" name="idm46444438277392"></a>

            <code class="literal">-DWITH_UNIT_TESTS={ON|OFF}</code>
          </p><p>
            If enabled, compile MySQL with unit tests. The default is ON
            unless the server is not being compiled.
          </p></li><li class="listitem"><p><a name="option_cmake_with_unixodbc"></a>
            <a class="indexterm" name="idm46444438273488"></a>

            <a class="indexterm" name="idm46444438272000"></a>

            <code class="literal">-DWITH_UNIXODBC=<em class="replaceable"><code>1</code></em></code>
          </p><p>
            Enables unixODBC support, for Connector/ODBC.
          </p></li><li class="listitem"><p><a name="option_cmake_with_valgrind"></a>
            <a class="indexterm" name="idm46444438267872"></a>

            <a class="indexterm" name="idm46444438266384"></a>

            <code class="literal">-DWITH_VALGRIND=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to compile in the Valgrind header files, which
            exposes the Valgrind API to MySQL code. The default is
            <code class="literal">OFF</code>.
          </p><p>
            To generate a Valgrind-aware debug build,
            <a class="link" href="installing.html#option_cmake_with_valgrind"><code class="option">-DWITH_VALGRIND=1</code></a> normally is
            combined with <a class="link" href="installing.html#option_cmake_with_debug"><code class="option">-DWITH_DEBUG=1</code></a>.
            See
            <a class="ulink" href="https://dev.mysql.com/doc/internals/en/debug-configurations.html" target="_top">Building
            Debug Configurations</a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_zlib"></a>
            <a class="indexterm" name="idm46444438258256"></a>

            <a class="indexterm" name="idm46444438256800"></a>

            <code class="literal">-DWITH_ZLIB=<em class="replaceable"><code>zlib_type</code></em></code>
          </p><p>
            Some features require that the server be built with
            compression library support, such as the
            <a class="link" href="functions.html#function_compress"><code class="literal">COMPRESS()</code></a> and
            <a class="link" href="functions.html#function_uncompress"><code class="literal">UNCOMPRESS()</code></a> functions, and
            compression of the client/server protocol. The
            <a class="link" href="installing.html#option_cmake_with_zlib"><code class="option">WITH_ZLIB</code></a> indicates the source
            of <code class="literal">zlib</code> support:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the
                <code class="literal">zlib</code> library bundled with the
                distribution. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the system
                <code class="literal">zlib</code> library. If
                <a class="link" href="installing.html#option_cmake_with_zlib"><code class="option">WITH_ZLIB</code></a> is set to this
                value, the <a class="link" href="programs.html#zlib-decompress" title="4.8.3 zlib_decompress — Decompress mysqlpump ZLIB-Compressed Output"><span class="command"><strong>zlib_decompress</strong></span></a> utility is
                not built. In this case, the system <span class="command"><strong>openssl
                zlib</strong></span> command can be used instead.
</p></li></ul>
</div>
</li><li class="listitem"><p><a name="option_cmake_with_zstd"></a>
            <a class="indexterm" name="idm46444438240096"></a>

            <a class="indexterm" name="idm46444438238640"></a>

            <code class="literal">-DWITH_ZSTD=<em class="replaceable"><code>zstd_type</code></em></code>
          </p><p>
            Connection compression using the <code class="literal">zstd</code>
            algorithm (see
            <a class="xref" href="programs.html#connection-compression-control" title="4.2.6 Connection Compression Control">Section 4.2.6, “Connection Compression Control”</a>) requires
            that the server be built with <code class="literal">zstd</code>
            library support. The <a class="link" href="installing.html#option_cmake_with_zstd"><code class="option">WITH_ZSTD</code></a>
            indicates the source of <code class="literal">zstd</code> support:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">bundled</code>: Use the
                <code class="literal">zstd</code> library bundled with the
                distribution. This is the default.
              </p></li><li class="listitem"><p>
                <code class="literal">system</code>: Use the system
                <code class="literal">zstd</code> library.
</p></li></ul>
</div>
<p>
            This option was added in MySQL 8.0.18.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="cmake-compiler-flags"></a>Compiler Flags</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_cmake_cmake_c_flags"></a>
            <a class="indexterm" name="idm46444438223584"></a>

            <a class="indexterm" name="idm46444438222096"></a>

            <code class="literal">-DCMAKE_C_FLAGS="<em class="replaceable"><code>flags</code></em></code>"
          </p><p>
            Flags for the C Compiler.
          </p></li><li class="listitem"><p><a name="option_cmake_cmake_cxx_flags"></a>
            <a class="indexterm" name="idm46444438217984"></a>

            <a class="indexterm" name="idm46444438216496"></a>

            <code class="literal">-DCMAKE_CXX_FLAGS="<em class="replaceable"><code>flags</code></em></code>"
          </p><p>
            Flags for the C++ Compiler.
          </p></li><li class="listitem"><p><a name="option_cmake_with_default_compiler_options"></a>
            <a class="indexterm" name="idm46444438212224"></a>

            <a class="indexterm" name="idm46444438210768"></a>

            <code class="literal">-DWITH_DEFAULT_COMPILER_OPTIONS=<em class="replaceable"><code>bool</code></em></code>
          </p><p>
            Whether to use the flags from
            <code class="filename">cmake/build_configurations/compiler_options.cmake</code>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              All optimization flags were carefully chosen and tested by
              the MySQL build team. Overriding them can lead to
              unexpected results and is done at your own risk.
</p>
</div>
</li></ul>
</div>
<p>
        To specify your own C and C++ compiler flags, for flags that do
        not affect optimization, use the
        <a class="link" href="installing.html#option_cmake_cmake_c_flags"><code class="option">CMAKE_C_FLAGS</code></a> and
        <a class="link" href="installing.html#option_cmake_cmake_cxx_flags"><code class="option">CMAKE_CXX_FLAGS</code></a> CMake options.
      </p><p>
        When providing your own compiler flags, you might want to
        specify <a class="link" href="installing.html#option_cmake_cmake_build_type"><code class="option">CMAKE_BUILD_TYPE</code></a> as well.
      </p><p>
        For example, to create a 32-bit release build on a 64-bit Linux
        machine, do this:
      </p><pre data-lang="terminal" class="programlisting">mkdir bld
cd bld
cmake .. -DCMAKE_C_FLAGS=-m32 \
  -DCMAKE_CXX_FLAGS=-m32 \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo</pre><p>
        If you set flags that affect optimization
        (<code class="option">-O<em class="replaceable"><code>number</code></em></code>), you must
        set the
        <code class="option">CMAKE_C_FLAGS_<em class="replaceable"><code>build_type</code></em></code>
        and/or
        <code class="option">CMAKE_CXX_FLAGS_<em class="replaceable"><code>build_type</code></em></code>
        options, where <em class="replaceable"><code>build_type</code></em> corresponds
        to the <a class="link" href="installing.html#option_cmake_cmake_build_type"><code class="option">CMAKE_BUILD_TYPE</code></a> value. To
        specify a different optimization for the default build type
        (<code class="literal">RelWithDebInfo</code>) set the
        <code class="option">CMAKE_C_FLAGS_RELWITHDEBINFO</code> and
        <code class="option">CMAKE_CXX_FLAGS_RELWITHDEBINFO</code> options. For
        example, to compile on Linux with <code class="option">-O3</code> and with
        debug symbols, do this:
      </p><pre data-lang="terminal" class="programlisting">cmake .. -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g"</pre>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="cmake-mysql-cluster-options"></a>CMake Options for Compiling NDB Cluster</h4>

</div>

</div>

</div>
<p>
        The following options are for use when building MySQL 8.0
        sources with NDB Cluster support.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_cmake_memcached_home"></a>
            <a class="indexterm" name="idm46444438189584"></a>

            <a class="indexterm" name="idm46444438188096"></a>

            <code class="literal">-DMEMCACHED_HOME=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Perform the build using the memcached (version 1.6 or later)
            installed in the system directory indicated by
            <em class="replaceable"><code>dir_name</code></em>. Files from this
            installation that are used in the build include the
            memcached binary, header files, and libraries, as well as
            the <code class="literal">memcached_utilities</code> library and the
            header file <code class="filename">engine_testapp.h</code>.
          </p><p>
            You must leave this option unset when building
            <code class="literal">ndbmemcache</code> using the bundled memcached
            sources
            (<a class="link" href="installing.html#option_cmake_with_bundled_memcached"><code class="option">WITH_BUNDLED_MEMCACHED</code></a>
            option); in other words, the bundled sources are used by
            default).
          </p><p>
            While additional <span class="command"><strong>CMake</strong></span> options—such
            as for SASL authorization and for providing
            <code class="literal">dtrace</code> support—are available for
            use when compiling <span class="command"><strong>memcached</strong></span> from
            external sources, these options are currently not enabled
            for the <span class="command"><strong>memcached</strong></span> sources bundled with
            NDB Cluster.
          </p></li><li class="listitem"><p><a name="option_cmake_with_bundled_libevent"></a>
            <a class="indexterm" name="idm46444438175584"></a>

            <a class="indexterm" name="idm46444438174128"></a>

            <code class="literal">-DWITH_BUNDLED_LIBEVENT={ON|OFF}</code>
          </p><p>
            Use the <code class="literal">libevent</code> included in the NDB
            Cluster sources when building NDB Cluster with
            <code class="literal">ndbmemcached</code> support. Enabled by default.
            <code class="literal">OFF</code> causes the system's
            <code class="literal">libevent</code> to be used instead.
          </p></li><li class="listitem"><p><a name="option_cmake_with_bundled_memcached"></a>
            <a class="indexterm" name="idm46444438167232"></a>

            <a class="indexterm" name="idm46444438165776"></a>

            <code class="literal">-DWITH_BUNDLED_MEMCACHED={ON|OFF}</code>
          </p><p>
            Build the memcached sources included in the NDB Cluster
            source tree, then use the resulting memcached server when
            building the <code class="literal">ndbmemcache</code> engine. In this
            case, <span class="command"><strong>make install</strong></span> places the
            <span class="command"><strong>memcached</strong></span> binary in the installation
            <code class="filename">bin</code> directory, and the
            <code class="literal">ndbmemcache</code> engine shared library file
            <code class="filename">ndb_engine.so</code> in the installation
            <code class="filename">lib</code> directory.
          </p><p>
            This option is ON by default.
          </p></li><li class="listitem"><p><a name="option_cmake_with_classpath"></a>
            <a class="indexterm" name="idm46444438156192"></a>

            <a class="indexterm" name="idm46444438154704"></a>

            <code class="literal">-DWITH_CLASSPATH=<em class="replaceable"><code>path</code></em></code>
          </p><p>
            Sets the classpath for building NDB Cluster Connector for
            Java. The default is empty. This option is ignored if
            <a class="link" href="installing.html#option_cmake_with_ndb_java"><code class="option">-DWITH_NDB_JAVA=OFF</code></a> is used.
          </p></li><li class="listitem"><p><a name="option_cmake_with_error_insert"></a>
            <a class="indexterm" name="idm46444438149248"></a>

            <a class="indexterm" name="idm46444438147792"></a>

            <code class="literal">-DWITH_ERROR_INSERT={ON|OFF}</code>
          </p><p>
            Enables error injection in the
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> kernel. For testing only;
            not intended for use in building production binaries. The
            default is <code class="literal">OFF</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndbcluster_storage_engine"></a>
            <a class="indexterm" name="idm46444438141856"></a>

            <a class="indexterm" name="idm46444438140352"></a>

            <code class="literal">-DWITH_NDBCLUSTER_STORAGE_ENGINE={ON|OFF}</code>
          </p><p>
            This is an alias for
            <a class="link" href="installing.html#option_cmake_with_ndbcluster"><code class="option">WITH_NDBCLUSTER</code></a>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndbcluster"></a>
            <a class="indexterm" name="idm46444438135360"></a>

            <a class="indexterm" name="idm46444438133872"></a>

            <code class="literal">-DWITH_NDBCLUSTER={ON|OFF}</code>
          </p><p>
            Build and link in support for the
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a>
            (<a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDBCLUSTER</code></a>) storage engine in
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>. The default is
            <code class="literal">ON</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndbmtd"></a>
            <a class="indexterm" name="idm46444438125600"></a>

            <a class="indexterm" name="idm46444438124112"></a>

            <code class="literal">-DWITH_NDBMTD={ON|OFF}</code>
          </p><p>
            Build the multithreaded data node executable
            <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndbmtd" title="22.4.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded)"><span class="command"><strong>ndbmtd</strong></span></a>. The default is
            <code class="literal">ON</code>.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndb_binlog"></a>
            <a class="indexterm" name="idm46444438118160"></a>

            <a class="indexterm" name="idm46444438116672"></a>

            <code class="literal">-DWITH_NDB_BINLOG={ON|OFF}</code>
          </p><p>
            Enable binary logging by default in the
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> built using this option. ON by
            default.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndb_debug"></a>
            <a class="indexterm" name="idm46444438111456"></a>

            <a class="indexterm" name="idm46444438109968"></a>

            <code class="literal">-DWITH_NDB_DEBUG={ON|OFF}</code>
          </p><p>
            Enable building the debug versions of the NDB Cluster
            binaries. OFF by default.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndb_java"></a>
            <a class="indexterm" name="idm46444438106032"></a>

            <a class="indexterm" name="idm46444438104544"></a>

            <code class="literal">-DWITH_NDB_JAVA={ON|OFF}</code>
          </p><p>
            Enable building NDB Cluster with Java support, including
            <code class="literal">ClusterJ</code>.
          </p><p>
            This option is ON by default. If you do not wish to compile
            NDB Cluster with Java support, you must disable it
            explicitly by specifying
            <code class="option">-DWITH_NDB_JAVA=OFF</code> when running
            <span class="command"><strong>CMake</strong></span>. Otherwise, if Java cannot be
            found, configuration of the build fails.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndb_port"></a>
            <a class="indexterm" name="idm46444438098064"></a>

            <a class="indexterm" name="idm46444438096576"></a>

            <code class="literal">-DWITH_NDB_PORT=<em class="replaceable"><code>port</code></em></code>
          </p><p>
            Causes the NDB Cluster management server
            (<a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-mgmd" title="22.4.4 ndb_mgmd — The NDB Cluster Management Server Daemon"><span class="command"><strong>ndb_mgmd</strong></span></a>) that is built to use this
            <em class="replaceable"><code>port</code></em> by default. If this option
            is unset, the resulting management server tries to use port
            1186 by default.
          </p></li><li class="listitem"><p><a name="option_cmake_with_ndb_test"></a>
            <a class="indexterm" name="idm46444438090368"></a>

            <a class="indexterm" name="idm46444438088880"></a>

            <code class="literal">-DWITH_NDB_TEST={ON|OFF}</code>
          </p><p>
            If enabled, include a set of NDB API test programs. The
            default is OFF.
          </p></li><li class="listitem"><p><a name="option_cmake_with_plugin_ndbcluster"></a>
            <a class="indexterm" name="idm46444438084896"></a>

            <a class="indexterm" name="idm46444438083440"></a>

            <code class="literal">-DWITH_PLUGIN_NDBCLUSTER={ON|OFF}</code>
          </p><p>
            Alias for <a class="link" href="installing.html#option_cmake_with_ndbcluster"><code class="option">WITH_NDBCLUSTER</code></a>.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="compilation-problems"></a>2.9.8 Dealing with Problems Compiling MySQL</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444438078032"></a><a class="indexterm" name="idm46444438076576"></a><a class="indexterm" name="idm46444438075088"></a><a class="indexterm" name="idm46444438074016"></a><a class="indexterm" name="idm46444438072944"></a><p>
      The solution to many problems involves reconfiguring. If you do
      reconfigure, take note of the following:
</p><a class="indexterm" name="idm46444438070928"></a><a class="indexterm" name="idm46444438069840"></a>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          If <span class="command"><strong>CMake</strong></span> is run after it has previously
          been run, it may use information that was gathered during its
          previous invocation. This information is stored in
          <code class="filename">CMakeCache.txt</code>. When
          <span class="command"><strong>CMake</strong></span> starts, it looks for that file and
          reads its contents if it exists, on the assumption that the
          information is still correct. That assumption is invalid when
          you reconfigure.
        </p></li><li class="listitem"><p>
          Each time you run <span class="command"><strong>CMake</strong></span>, you must run
          <span class="command"><strong>make</strong></span> again to recompile. However, you may
          want to remove old object files from previous builds first
          because they were compiled using different configuration
          options.
</p></li></ul>
</div>
<p>
      To prevent old object files or configuration information from
      being used, run the following commands before re-running
      <span class="command"><strong>CMake</strong></span>:
    </p><p>
      On Unix:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>make clean</code></strong>
shell&gt; <strong class="userinput"><code>rm CMakeCache.txt</code></strong>
</pre><p>
      On Windows:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>devenv MySQL.sln /clean</code></strong>
shell&gt; <strong class="userinput"><code>del CMakeCache.txt</code></strong>
</pre><p>
      If you build outside of the source tree, remove and recreate your
      build directory before re-running <span class="command"><strong>CMake</strong></span>. For
      instructions on building outside of the source tree, see
      <a class="ulink" href="https://dev.mysql.com/doc/internals/en/cmake.html" target="_top">How to Build MySQL
      Server with CMake</a>.
    </p><p>
      On some systems, warnings may occur due to differences in system
      include files. The following list describes other problems that
      have been found to occur most often when compiling MySQL:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <a class="indexterm" name="idm46444438051888"></a>

          <a class="indexterm" name="idm46444438050816"></a>

          <a class="indexterm" name="idm46444438049360"></a>

          <a class="indexterm" name="idm46444438048272"></a>

          To define which C and C++ compilers to use, you can define the
          <code class="literal">CC</code> and <code class="literal">CXX</code> environment
          variables. For example:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>CC=gcc</code></strong>
shell&gt; <strong class="userinput"><code>CXX=g++</code></strong>
shell&gt; <strong class="userinput"><code>export CC CXX</code></strong>
</pre><p>
          To specify your own C and C++ compiler flags, use the
          <a class="link" href="installing.html#option_cmake_cmake_c_flags"><code class="option">CMAKE_C_FLAGS</code></a> and
          <a class="link" href="installing.html#option_cmake_cmake_cxx_flags"><code class="option">CMAKE_CXX_FLAGS</code></a> CMake options.
          See <a class="xref" href="installing.html#cmake-compiler-flags" title="Compiler Flags">Compiler Flags</a>.
        </p><p>
          To see what flags you might need to specify, invoke
          <a class="link" href="programs.html#mysql-config" title="4.7.1 mysql_config — Display Options for Compiling Clients"><span class="command"><strong>mysql_config</strong></span></a> with the
          <a class="link" href="programs.html#option_mysql_config_cflags"><code class="option">--cflags</code></a> and
          <a class="link" href="programs.html#option_mysql_config_cxxflags"><code class="option">--cxxflags</code></a> options.
        </p></li><li class="listitem"><p>
          To see what commands are executed during the compile stage,
          after using <span class="command"><strong>CMake</strong></span> to configure MySQL, run
          <span class="command"><strong>make VERBOSE=1</strong></span> rather than just
          <span class="command"><strong>make</strong></span>.
        </p></li><li class="listitem"><p>
          If compilation fails, check whether the
          <a class="link" href="installing.html#option_cmake_mysql_maintainer_mode"><code class="option">MYSQL_MAINTAINER_MODE</code></a> option is
          enabled. This mode causes compiler warnings to become errors,
          so disabling it may enable compilation to proceed.
        </p></li><li class="listitem"><p>
          If your compile fails with errors such as any of the
          following, you must upgrade your version of
          <span class="command"><strong>make</strong></span> to GNU <span class="command"><strong>make</strong></span>:
        </p><pre data-lang="simple" class="programlisting">make: Fatal error in reader: Makefile, line 18:
Badly formed macro assignment</pre><p>
          Or:
        </p><pre data-lang="simple" class="programlisting">make: file `Makefile' line 18: Must be a separator (:</pre><p>
          Or:
        </p><pre data-lang="simple" class="programlisting">pthread.h: No such file or directory</pre><a class="indexterm" name="idm46444438023664"></a><a class="indexterm" name="idm46444438022592"></a><p>
          Solaris and FreeBSD are known to have troublesome
          <span class="command"><strong>make</strong></span> programs.
        </p><p>
          GNU <span class="command"><strong>make</strong></span> 3.75 is known to work.
        </p></li><li class="listitem"><p>
          The <code class="filename">sql_yacc.cc</code> file is generated from
          <code class="filename">sql_yacc.yy</code>. Normally, the build process
          does not need to create <code class="filename">sql_yacc.cc</code>
          because MySQL comes with a pregenerated copy. However, if you
          do need to re-create it, you might encounter this error:
        </p><pre data-lang="simple" class="programlisting">"sql_yacc.yy", line <em class="replaceable"><code>xxx</code></em> fatal: default action causes potential...
</pre><p>
          This is a sign that your version of <span class="command"><strong>yacc</strong></span> is
          deficient. You probably need to install a recent version of
          <span class="command"><strong>bison</strong></span> (the GNU version of
          <span class="command"><strong>yacc</strong></span>) and use that instead.
        </p><p>
          Versions of <span class="command"><strong>bison</strong></span> older than 1.75 may
          report this error:
        </p><pre data-lang="simple" class="programlisting">sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded</pre><p>
          The maximum table size is not actually exceeded; the error is
          caused by bugs in older versions of <span class="command"><strong>bison</strong></span>.
</p></li></ul>
</div>
<p>
      For information about acquiring or updating tools, see the system
      requirements in <a class="xref" href="installing.html#source-installation" title="2.9 Installing MySQL from Source">Section 2.9, “Installing MySQL from Source”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-configuration-third-party"></a>2.9.9 MySQL Configuration and Third-Party Tools</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444438005680"></a><a class="indexterm" name="idm46444438004192"></a><p>
      Third-party tools that need to determine the MySQL version from
      the MySQL source can read the <code class="filename">VERSION</code> file in
      the top-level source directory. The file lists the pieces of the
      version separately. For example, if the version is MySQL 8.0.4-rc,
      the file looks like this:
    </p><pre data-lang="simple" class="programlisting">MYSQL_VERSION_MAJOR=8
MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=4
MYSQL_VERSION_EXTRA=-rc</pre><p>
      If the source is not for a General Availablility (GA) release, the
      <code class="literal">MYSQL_VERSION_EXTRA</code> value will be nonempty. For
      the example, the value corresponds to Release Candidate.
    </p><p>
      To construct a five-digit number from the version components, use
      this formula:
</p><pre data-lang="simple" class="programlisting">MYSQL_VERSION_MAJOR*10000 + MYSQL_VERSION_MINOR*100 + MYSQL_VERSION_PATCH</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="source-installation-doxygen"></a>2.9.10 Generating MySQL Doxygen Documentation Content</h3>

</div>

</div>

</div>
<p>
      The MySQL source code contains internal documentation written
      using Doxygen. The generated Doxygen content is available at
      <a class="ulink" href="https://dev.mysql.com/doc/index-other.html" target="_top">https://dev.mysql.com/doc/index-other.html</a>. It is also possible to
      generate this content locally from a MySQL source distribution
      using the following procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Install <span class="command"><strong>doxygen</strong></span> 1.8.11 or higher.
          Distributions are available here at
          <a class="ulink" href="http://www.doxygen.nl/" target="_top">http://www.doxygen.nl/</a>.
        </p><p>
          After installing <span class="command"><strong>doxygen</strong></span>, verify the
          version number:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>doxygen --version</code></strong>
1.8.13
</pre></li><li class="listitem"><p>
          Install
          <a class="ulink" href="http://plantuml.com/download.html" target="_top">PlantUML</a>.
        </p><p>
          When you install PlantUML on Windows (tested on Windows 10),
          you must run it at least once as administrator so it creates
          the registry keys. Open an administrator console and run this
          command:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; java -jar <em class="replaceable"><code>path-to-plantuml.jar</code></em>
</pre><p>
          The command should open a GUI window and return no errors on
          the console.
        </p></li><li class="listitem"><p>
          Set the <code class="literal">PLANTUML_JAR_PATH</code> environment to
          the location where you installed PlantUML. For example:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; export PLANTUML_JAR_PATH=<em class="replaceable"><code>path-to-plantuml.jar</code></em>
</pre></li><li class="listitem"><p>
          Install the
          <a class="ulink" href="http://www.graphviz.org/" target="_top">Graphviz</a>
          <span class="command"><strong>dot</strong></span> command.
        </p><p>
          After installing Graphviz, verify <code class="literal">dot</code>
          availability. For example:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>which dot</code></strong>
/usr/bin/dot

shell&gt; <strong class="userinput"><code>dot -V</code></strong>
dot - graphviz version 2.28.0 (20130928.0220)
</pre></li><li class="listitem"><p>
          Change location to the top-level directory of your MySQL
          source distribution and do the following:
        </p><p>
          First, execute <span class="command"><strong>cmake</strong></span>:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; cd your-mysql-source-directory
shell&gt; mkdir bld
shell&gt; cd bld
shell&gt; cmake ..</pre><p>
          Next, generate the <span class="command"><strong>doxygen</strong></span> documentation:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; make doxygen</pre><p>
          Inspect the error log. It is available in the
          <code class="filename">doxyerror.log</code> file in the top-level
          directory. Assuming that the build executed successfully, view
          the generated output using a browser. For example:
</p><pre data-lang="terminal" class="programlisting">shell&gt; firefox doxygen/html/index.html</pre></li></ol>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="postinstallation"></a>2.10 Postinstallation Setup and Testing</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#data-directory-initialization">2.10.1 Initializing the Data Directory</a></span></dt><dt><span class="section"><a href="installing.html#starting-server">2.10.2 Starting the Server</a></span></dt><dt><span class="section"><a href="installing.html#testing-server">2.10.3 Testing the Server</a></span></dt><dt><span class="section"><a href="installing.html#default-privileges">2.10.4 Securing the Initial MySQL Account</a></span></dt><dt><span class="section"><a href="installing.html#automatic-start">2.10.5 Starting and Stopping MySQL Automatically</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444437967072"></a><a class="indexterm" name="idm46444437965616"></a><a class="indexterm" name="idm46444437964128"></a><p>
    This section discusses tasks that you should perform after
    installing MySQL:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        If necessary, initialize the data directory and create the MySQL
        grant tables. For some MySQL installation methods, data
        directory initialization may be done for you automatically:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
            Windows installation operations performed by MySQL Installer.
          </p></li><li class="listitem"><p>
            Installation on Linux using a server RPM or Debian
            distribution from Oracle.
          </p></li><li class="listitem"><p>
            Installation using the native packaging system on many
            platforms, including Debian Linux, Ubuntu Linux, Gentoo
            Linux, and others.
          </p></li><li class="listitem"><p>
            Installation on macOS using a DMG distribution.
</p></li></ul>
</div>
<p>
        For other platforms and installation types, you must initialize
        the data directory manually. These include installation from
        generic binary and source distributions on Unix and Unix-like
        system, and installation from a ZIP Archive package on Windows.
        For instructions, see
        <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
      </p></li><li class="listitem"><p>
        Start the server and make sure that it can be accessed. For
        instructions, see <a class="xref" href="installing.html#starting-server" title="2.10.2 Starting the Server">Section 2.10.2, “Starting the Server”</a>, and
        <a class="xref" href="installing.html#testing-server" title="2.10.3 Testing the Server">Section 2.10.3, “Testing the Server”</a>.
      </p></li><li class="listitem"><p>
        Assign passwords to the initial <code class="literal">root</code> account
        in the grant tables, if that was not already done during data
        directory initialization. Passwords prevent unauthorized access
        to the MySQL server. For instructions, see
        <a class="xref" href="installing.html#default-privileges" title="2.10.4 Securing the Initial MySQL Account">Section 2.10.4, “Securing the Initial MySQL Account”</a>.
      </p></li><li class="listitem"><p>
        Optionally, arrange for the server to start and stop
        automatically when your system starts and stops. For
        instructions, see <a class="xref" href="installing.html#automatic-start" title="2.10.5 Starting and Stopping MySQL Automatically">Section 2.10.5, “Starting and Stopping MySQL Automatically”</a>.
      </p></li><li class="listitem"><p>
        Optionally, populate time zone tables to enable recognition of
        named time zones. For instructions, see
        <a class="xref" href="server-administration.html#time-zone-support" title="5.1.14 MySQL Server Time Zone Support">Section 5.1.14, “MySQL Server Time Zone Support”</a>.
</p></li></ul>
</div>
<p>
    When you are ready to create additional user accounts, you can find
    information on the MySQL access control system and account
    management in <a class="xref" href="security.html#access-control" title="6.2 Access Control and Account Management">Section 6.2, “Access Control and Account Management”</a>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="data-directory-initialization"></a>2.10.1 Initializing the Data Directory</h3>
</div>
</div>
</div>
<p>
      After MySQL is installed, the data directory must be initialized,
      including the tables in the <code class="literal">mysql</code> system
      schema:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          For some MySQL installation methods, data directory
          initialization is automatic, as described in
          <a class="xref" href="installing.html#postinstallation" title="2.10 Postinstallation Setup and Testing">Section 2.10, “Postinstallation Setup and Testing”</a>.
        </p></li><li class="listitem"><p>
          For other installation methods, you must initialize the data
          directory manually. These include installation from generic
          binary and source distributions on Unix and Unix-like systems,
          and installation from a ZIP Archive package on Windows.
</p></li></ul>
</div>
<p>
      This section describes how to initialize the data directory
      manually for MySQL installation methods for which data directory
      initialization is not automatic. For some suggested commands that
      enable testing whether the server is accessible and working
      properly, see <a class="xref" href="installing.html#testing-server" title="2.10.3 Testing the Server">Section 2.10.3, “Testing the Server”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        In MySQL 8.0, the default authentication plugin has changed from
        <code class="literal">mysql_native_password</code> to
        <code class="literal">caching_sha2_password</code>, and the
        <code class="literal">'root'@'localhost'</code> administrative account
        uses <code class="literal">caching_sha2_password</code> by default. If you
        prefer that the <code class="literal">root</code> account use the previous
        default authentication plugin
        (<code class="literal">mysql_native_password</code>), see
        <a class="xref" href="installing.html#upgrade-caching-sha2-password-root-account" title="caching_sha2_password and the root Administrative Account">caching_sha2_password and the root Administrative Account</a>.
</p>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#data-directory-initialization-overview" title="Data Directory Initialization Overview">Data Directory Initialization Overview</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#data-directory-initialization-procedure" title="Data Directory Initialization Procedure">Data Directory Initialization Procedure</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#data-directory-initialization-server-actions" title="Server Actions During Data Directory Initialization">Server Actions During Data Directory Initialization</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#data-directory-initialization-password-assignment" title="Post-Initialization root Password Assignment">Post-Initialization root Password Assignment</a></p></li></ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="data-directory-initialization-overview"></a>Data Directory Initialization Overview</h4>

</div>

</div>

</div>
<p>
        In the examples shown here, the server is intended to run under
        the user ID of the <code class="literal">mysql</code> login account.
        Either create the account if it does not exist (see
        <a class="xref" href="installing.html#binary-installation-createsysuser" title="Create a mysql User and Group">Create a mysql User and Group</a>), or
        substitute the name of a different existing login account that
        you plan to use for running the server.
</p><a class="indexterm" name="idm46444437925024"></a><a class="indexterm" name="idm46444437923536"></a><a class="indexterm" name="idm46444437922048"></a>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Change location to the top-level directory of your MySQL
            installation, which is typically
            <code class="filename">/usr/local/mysql</code> (adjust the path name
            for your system as necessary):
          </p><pre data-lang="terminal" class="programlisting">cd /usr/local/mysql</pre><p>
            Within the directory you will find several files and
            subdirectories, including the <code class="filename">bin</code>
            subdirectory that contains the server as well as client and
            utility programs.
          </p></li><li class="listitem"><p>
            The <a class="link" href="server-administration.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a> system
            variable limits import and export operations to a specific
            directory. Create a directory whose location can be
            specified as the value of that variable:
          </p><pre data-lang="terminal" class="programlisting">mkdir mysql-files</pre><p>
            Grant directory user and group ownership to the
            <code class="literal">mysql</code> user and <code class="literal">mysql</code>
            group, and set the directory permissions appropriately:
          </p><pre data-lang="terminal" class="programlisting">chown mysql:mysql mysql-files
chmod 750 mysql-files</pre></li><li class="listitem"><p>
            Use the server to initialize the data directory, including
            the <code class="literal">mysql</code> schema containing the initial
            MySQL grant tables that determine how users are permitted to
            connect to the server. For example:
          </p><pre data-lang="terminal" class="programlisting">bin/mysqld --initialize --user=mysql</pre><p>
            For important information about the command, especially
            regarding command options you might use, see
            <a class="xref" href="installing.html#data-directory-initialization-procedure" title="Data Directory Initialization Procedure">Data Directory Initialization Procedure</a>.
            For details about how the server performs initialization,
            see
            <a class="xref" href="installing.html#data-directory-initialization-server-actions" title="Server Actions During Data Directory Initialization">Server Actions During Data Directory Initialization</a>.
          </p><p>
            Typically, data directory initialization need be done only
            after you first install MySQL. (For upgrades to an existing
            installation, perform the upgrade procedure instead; see
            <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a>.) However, the command that
            initializes the data directory does not overwrite any
            existing <code class="literal">mysql</code> schema tables, so it is
            safe to run in any circumstances.
          </p></li><li class="listitem"><p>
            If you want to deploy the server with automatic support for
            secure connections, use the
            <a class="link" href="programs.html#mysql-ssl-rsa-setup" title="4.4.3 mysql_ssl_rsa_setup — Create SSL/RSA Files"><span class="command"><strong>mysql_ssl_rsa_setup</strong></span></a> utility to create
            default SSL and RSA files:
          </p><pre data-lang="terminal" class="programlisting">bin/mysql_ssl_rsa_setup</pre><p>
            For more information, see
            <a class="xref" href="programs.html#mysql-ssl-rsa-setup" title="4.4.3 mysql_ssl_rsa_setup — Create SSL/RSA Files">Section 4.4.3, “<span class="command"><strong>mysql_ssl_rsa_setup</strong></span> — Create SSL/RSA Files”</a>.
          </p></li><li class="listitem"><p>
            In the absence of any option files, the server starts with
            its default settings. (See
            <a class="xref" href="server-administration.html#server-configuration-defaults" title="5.1.2 Server Configuration Defaults">Section 5.1.2, “Server Configuration Defaults”</a>.) To
            explicitly specify options that the MySQL server should use
            at startup, put them in an option file such as
            <code class="filename">/etc/my.cnf</code> or
            <code class="filename">/etc/mysql/my.cnf</code>. (See
            <a class="xref" href="programs.html#option-files" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>.) For example, you can use an
            option file to set the
            <a class="link" href="server-administration.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a> system
            variable.
          </p></li><li class="listitem"><p>
            To arrange for MySQL to start without manual intervention at
            system boot time, see <a class="xref" href="installing.html#automatic-start" title="2.10.5 Starting and Stopping MySQL Automatically">Section 2.10.5, “Starting and Stopping MySQL Automatically”</a>.
          </p></li><li class="listitem"><p>
            Data directory initialization creates time zone tables in
            the <code class="literal">mysql</code> schema but does not populate
            them. To do so, use the instructions in
            <a class="xref" href="server-administration.html#time-zone-support" title="5.1.14 MySQL Server Time Zone Support">Section 5.1.14, “MySQL Server Time Zone Support”</a>.
</p></li></ol>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="data-directory-initialization-procedure"></a>Data Directory Initialization Procedure</h4>

</div>

</div>

</div>
<p>
        Change location to the top-level directory of your MySQL
        installation, which is typically
        <code class="filename">/usr/local/mysql</code> (adjust the path name for
        your system as necessary):
      </p><pre data-lang="terminal" class="programlisting">cd /usr/local/mysql</pre><p>
        To initialize the data directory, invoke
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with the
        <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> or
        <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a> option,
        depending on whether you want the server to generate a random
        initial password for the <code class="literal">'root'@'localhost'</code>
        account, or to create that account with no password:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Use <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> for
            <span class="quote">“<span class="quote">secure by default</span>”</span> installation (that is,
            including generation of a random initial
            <code class="literal">root</code> password). In this case, the
            password is marked as expired and you will need to choose a
            new one.
          </p></li><li class="listitem"><p>
            With <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>,
            no <code class="literal">root</code> password is generated. This is
            insecure; it is assumed that you will assign a password to
            the account in timely fashion before putting the server into
            production use.
</p></li></ul>
</div>
<p>
        For instructions on assigning a new
        <code class="literal">'root'@'localhost'</code> password, see
        <a class="xref" href="installing.html#data-directory-initialization-password-assignment" title="Post-Initialization root Password Assignment">Post-Initialization root Password Assignment</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          The server writes any messages (including any initial
          password) to its standard error output. This may be redirected
          to the error log, so look there if you do not see the messages
          on your screen. For information about the error log, including
          where it is located, see <a class="xref" href="server-administration.html#error-log" title="5.4.2 The Error Log">Section 5.4.2, “The Error Log”</a>.
        </p><p>
          On Windows, use the <a class="link" href="server-administration.html#option_mysqld_console"><code class="option">--console</code></a>
          option to direct messages to the console.
</p>
</div>
<p>
        On Unix and Unix-like systems, it is important for the database
        directories and files to be owned by the
        <code class="literal">mysql</code> login account so that the server has
        read and write access to them when you run it later. To ensure
        this, start <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> from the system
        <code class="literal">root</code> account and include the
        <a class="link" href="server-administration.html#option_mysqld_user"><code class="option">--user</code></a> option as shown here:
      </p><pre data-lang="terminal" class="programlisting">bin/mysqld --initialize --user=mysql
bin/mysqld --initialize-insecure --user=mysql</pre><p>
        Alternatively, execute <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> while logged in
        as <code class="literal">mysql</code>, in which case you can omit the
        <a class="link" href="server-administration.html#option_mysqld_user"><code class="option">--user</code></a> option from the command.
      </p><p>
        On Windows, use one of these commands:
      </p><pre data-lang="terminal" class="programlisting">bin\mysqld --initialize --console
bin\mysqld --initialize-insecure --console</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Data directory initialization might fail if required system
          libraries are missing. For example, you might see an error
          like this:
        </p><pre data-lang="none" class="programlisting">bin/mysqld: error while loading shared libraries:
libnuma.so.1: cannot open shared object file:
No such file or directory</pre><p>
          If this happens, you must install the missing libraries
          manually or with your system's package manager. Then retry the
          data directory initialization command.
</p>
</div>
<p>
        It might be necessary to specify other options such as
        <a class="link" href="server-administration.html#sysvar_basedir"><code class="option">--basedir</code></a> or
        <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">--datadir</code></a> if
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> cannot identify the correct locations
        for the installation directory or data directory. For example
        (enter the command on a single line):
      </p><pre data-lang="terminal" class="programlisting">bin/mysqld --initialize --user=mysql
  --basedir=/opt/mysql/mysql
  --datadir=/opt/mysql/mysql/data</pre><p>
        Alternatively, put the relevant option settings in an option
        file and pass the name of that file to
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>. For Unix and Unix-like systems,
        suppose that the option file name is
        <code class="filename">/opt/mysql/mysql/etc/my.cnf</code>. Put these
        lines in the file:
      </p><pre data-lang="ini" class="programlisting">[mysqld]
basedir=/opt/mysql/mysql
datadir=/opt/mysql/mysql/data</pre><p>
        Then invoke <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> as follows (enter the
        command on a single line with the
        <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> option first):
      </p><pre data-lang="terminal" class="programlisting">bin/mysqld --defaults-file=/opt/mysql/mysql/etc/my.cnf
  --initialize --user=mysql</pre><p>
        On Windows, suppose that <code class="literal">C:\my.ini</code> contains
        these lines:
      </p><pre data-lang="ini" class="programlisting">[mysqld]
basedir=C:\\Program Files\\MySQL\\MySQL Server 8.0
datadir=D:\\MySQLdata</pre><p>
        Then invoke <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> as follows (enter the
        command on a single line with the
        <a class="link" href="programs.html#option_general_defaults-file"><code class="option">--defaults-file</code></a> option first):
      </p><pre data-lang="terminal" class="programlisting">bin\mysqld --defaults-file=C:\my.ini
--initialize --console</pre>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="data-directory-initialization-server-actions"></a>Server Actions During Data Directory Initialization</h4>

</div>

</div>

</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          The data directory initialization sequence performed by the
          server does not substitute for the actions performed by
          <a class="link" href="programs.html#mysql-secure-installation" title="4.4.2 mysql_secure_installation — Improve MySQL Installation Security"><span class="command"><strong>mysql_secure_installation</strong></span></a> and
          <a class="link" href="programs.html#mysql-ssl-rsa-setup" title="4.4.3 mysql_ssl_rsa_setup — Create SSL/RSA Files"><span class="command"><strong>mysql_ssl_rsa_setup</strong></span></a>. See
          <a class="xref" href="programs.html#mysql-secure-installation" title="4.4.2 mysql_secure_installation — Improve MySQL Installation Security">Section 4.4.2, “<span class="command"><strong>mysql_secure_installation</strong></span> — Improve MySQL Installation Security”</a>, and
          <a class="xref" href="programs.html#mysql-ssl-rsa-setup" title="4.4.3 mysql_ssl_rsa_setup — Create SSL/RSA Files">Section 4.4.3, “<span class="command"><strong>mysql_ssl_rsa_setup</strong></span> — Create SSL/RSA Files”</a>.
</p>
</div>
<p>
        When invoked with the
        <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> or
        <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a> option,
        <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> performs the following actions during
        the data directory initialization sequence:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            The server checks for the existence of the data directory as
            follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                If no data directory exists, the server creates it.
              </p></li><li class="listitem"><p>
                If the data directory exists but is not empty (that is,
                it contains files or subdirectories), the server exits
                after producing an error message:
              </p><pre data-lang="none" class="programlisting">[ERROR] --initialize specified but the data directory exists. Aborting.</pre><p>
                In this case, remove or rename the data directory and
                try again.
              </p><p>
                An existing data directory is permitted to be nonempty
                if every entry has a name that begins with a period
                (<code class="literal">.</code>).
</p></li></ul>
</div>
</li><li class="listitem"><p>
            Within the data directory, the server creates the
            <code class="literal">mysql</code> system schema and its tables,
            including the data dictionary tables, grant tables, time
            zone tables, and server-side help tables. See
            <a class="xref" href="server-administration.html#system-schema" title="5.3 The mysql System Schema">Section 5.3, “The mysql System Schema”</a>.
          </p></li><li class="listitem"><p>
            The server initializes the
            <a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">system
            tablespace</a> and related data structures needed to
            manage <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> tables.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              After <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> sets up the
              <code class="literal">InnoDB</code>
              <a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">system
              tablespace</a>, certain changes to tablespace
              characteristics require setting up a whole new
              <a class="link" href="glossary.html#glos_instance" title="instance">instance</a>. Qualifying
              changes include the file name of the first file in the
              system tablespace and the number of undo logs. If you do
              not want to use the default values, make sure that the
              settings for the
              <a class="link" href="innodb-storage-engine.html#sysvar_innodb_data_file_path"><code class="literal">innodb_data_file_path</code></a> and
              <a class="link" href="innodb-storage-engine.html#sysvar_innodb_log_file_size"><code class="literal">innodb_log_file_size</code></a>
              configuration parameters are in place in the MySQL
              <a class="link" href="glossary.html#glos_configuration_file" title="configuration file">configuration
              file</a> <span class="emphasis"><em>before</em></span> running
              <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>. Also make sure to specify as
              necessary other parameters that affect the creation and
              location of <code class="literal">InnoDB</code> files, such as
              <a class="link" href="innodb-storage-engine.html#sysvar_innodb_data_home_dir"><code class="literal">innodb_data_home_dir</code></a> and
              <a class="link" href="innodb-storage-engine.html#sysvar_innodb_log_group_home_dir"><code class="literal">innodb_log_group_home_dir</code></a>.
            </p><p>
              If those options are in your configuration file but that
              file is not in a location that MySQL reads by default,
              specify the file location using the
              <a class="link" href="server-administration.html#option_mysqld_defaults-extra-file"><code class="option">--defaults-extra-file</code></a>
              option when you run <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>.
</p>
</div>
</li><li class="listitem"><p>
            The server creates a <code class="literal">'root'@'localhost'</code>
            superuser account and other reserved accounts (see
            <a class="xref" href="security.html#reserved-users" title="6.2.9 Reserved Accounts">Section 6.2.9, “Reserved Accounts”</a>). Some reserved accounts
            are locked and cannot be used by clients, but
            <code class="literal">'root'@'localhost'</code> is intended for
            administrative use and you should assign it a password.
          </p><p>
            Server actions with respect to a password for the
            <code class="literal">'root'@'localhost'</code> account depend on how
            you invoke it:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                With <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> but not
                <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>,
                the server generates a random password, marks it as
                expired, and writes a message displaying the password:
              </p><pre data-lang="none" class="programlisting">[Warning] A temporary password is generated for root@localhost:
iTag*AfrH5ej</pre></li><li class="listitem"><p>
                With
                <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>,
                (either with or without
                <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> because
                <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>
                implies <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a>),
                the server does not generate a password or mark it
                expired, and writes a warning message:
              </p><pre data-lang="none" class="programlisting">[Warning] root@localhost is created with an empty password ! Please
consider switching off the --initialize-insecure option.</pre></li></ul>
</div>
<p>
            For instructions on assigning a new
            <code class="literal">'root'@'localhost'</code> password, see
            <a class="xref" href="installing.html#data-directory-initialization-password-assignment" title="Post-Initialization root Password Assignment">Post-Initialization root Password Assignment</a>.
          </p></li><li class="listitem"><p>
            The server populates the server-side help tables used for
            the <a class="link" href="sql-statements.html#help" title="13.8.3 HELP Statement"><code class="literal">HELP</code></a> statement (see
            <a class="xref" href="sql-statements.html#help" title="13.8.3 HELP Statement">Section 13.8.3, “HELP Statement”</a>). The server does not populate the
            time zone tables. To do so manually, see
            <a class="xref" href="server-administration.html#time-zone-support" title="5.1.14 MySQL Server Time Zone Support">Section 5.1.14, “MySQL Server Time Zone Support”</a>.
          </p></li><li class="listitem"><p>
            If the <a class="link" href="server-administration.html#sysvar_init_file"><code class="literal">init_file</code></a> system
            variable was given to name a file of SQL statements, the
            server executes the statements in the file. This option
            enables you to perform custom bootstrapping sequences.
          </p><p>
            When the server operates in bootstrap mode, some
            functionality is unavailable that limits the statements
            permitted in the file. These include statements that relate
            to account management (such as <a class="link" href="sql-statements.html#create-user" title="13.7.1.3 CREATE USER Statement"><code class="literal">CREATE
            USER</code></a> or <a class="link" href="sql-statements.html#grant" title="13.7.1.6 GRANT Statement"><code class="literal">GRANT</code></a>),
            replication, and global transaction identifiers.
          </p></li><li class="listitem"><p>
            The server exits.
</p></li></ol>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="data-directory-initialization-password-assignment"></a>Post-Initialization root Password Assignment</h4>

</div>

</div>

</div>
<p>
        After you initialize the data directory by starting the server
        with <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> or
        <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>, start the
        server normally (that is, without either of those options) and
        assign the <code class="literal">'root'@'localhost'</code> account a new
        password:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Start the server. For instructions, see
            <a class="xref" href="installing.html#starting-server" title="2.10.2 Starting the Server">Section 2.10.2, “Starting the Server”</a>.
          </p></li><li class="listitem"><p>
            Connect to the server:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                If you used <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a>
                but not
                <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a> to
                initialize the data directory, connect to the server as
                <code class="literal">root</code>:
              </p><pre data-lang="terminal" class="programlisting">mysql -u root -p</pre><p>
                Then, at the password prompt, enter the random password
                that the server generated during the initialization
                sequence:
              </p><pre data-lang="none" class="programlisting">Enter password: <em class="replaceable"><code>(enter the random root password here)</code></em>
</pre><p>
                Look in the server error log if you do not know this
                password.
              </p></li><li class="listitem"><p>
                If you used
                <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a> to
                initialize the data directory, connect to the server as
                <code class="literal">root</code> without a password:
</p><pre data-lang="terminal" class="programlisting">mysql -u root --skip-password</pre></li></ul>
</div>
</li><li class="listitem"><p>
            After connecting, use an <a class="link" href="sql-statements.html#alter-user" title="13.7.1.1 ALTER USER Statement"><code class="literal">ALTER
            USER</code></a> statement to assign a new
            <code class="literal">root</code> password:
          </p><pre data-lang="sql" class="programlisting">ALTER USER 'root'@'localhost' IDENTIFIED BY '<em class="replaceable"><code>root-password'</code></em>;
</pre></li></ol>
</div>
<p>
        See also <a class="xref" href="installing.html#default-privileges" title="2.10.4 Securing the Initial MySQL Account">Section 2.10.4, “Securing the Initial MySQL Account”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          Attempts to connect to the host <code class="literal">127.0.0.1</code>
          normally resolve to the <code class="literal">localhost</code> account.
          However, this fails if the server is run with
          <a class="link" href="server-administration.html#sysvar_skip_name_resolve"><code class="literal">skip_name_resolve</code></a> enabled. If
          you plan to do that, make sure that an account exists that can
          accept a connection. For example, to be able to connect as
          <code class="literal">root</code> using
          <code class="option">--host=127.0.0.1</code> or
          <code class="option">--host=::1</code>, create these accounts:
        </p><pre data-lang="sql" class="programlisting">CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY '<em class="replaceable"><code>root-password</code></em>';
CREATE USER 'root'@'::1' IDENTIFIED BY '<em class="replaceable"><code>root-password</code></em>';
</pre><p>
          It is possible to put those statements in a file to be
          executed using the <a class="link" href="server-administration.html#sysvar_init_file"><code class="literal">init_file</code></a>
          system variable, as discussed in
          <a class="xref" href="installing.html#data-directory-initialization-server-actions" title="Server Actions During Data Directory Initialization">Server Actions During Data Directory Initialization</a>.
</p>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="starting-server"></a>2.10.2 Starting the Server</h3>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#starting-server-troubleshooting">2.10.2.1 Troubleshooting Problems Starting the MySQL Server</a></span></dt></dl>
</div>
<p>
      This section describes how start the server on Unix and Unix-like
      systems. (For Windows, see
      <a class="xref" href="installing.html#windows-server-first-start" title="2.3.4.5 Starting the Server for the First Time">Section 2.3.4.5, “Starting the Server for the First Time”</a>.) For some suggested
      commands that you can use to test whether the server is accessible
      and working properly, see <a class="xref" href="installing.html#testing-server" title="2.10.3 Testing the Server">Section 2.10.3, “Testing the Server”</a>.
    </p><p>
      Start the MySQL server like this if your installation includes
      <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqld_safe --user=mysql &amp;</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        For Linux systems on which MySQL is installed using RPM
        packages, server startup and shutdown is managed using systemd
        rather than <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>, and
        <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> is not installed. See
        <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a>.
</p>
</div>
<p>
      Start the server like this if your installation includes systemd
      support:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>systemctl start mysqld</code></strong>
</pre><p>
      Substitute the appropriate service name if it differs from
      <code class="literal">mysqld</code> (for example, <code class="literal">mysql</code>
      on SLES systems).
    </p><p>
      It is important that the MySQL server be run using an unprivileged
      (non-<code class="literal">root</code>) login account. To ensure this, run
      <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> as <code class="literal">root</code> and
      include the <a class="link" href="programs.html#option_mysqld_safe_user"><code class="option">--user</code></a> option as
      shown. Otherwise, you should execute the program while logged in
      as <code class="literal">mysql</code>, in which case you can omit the
      <a class="link" href="programs.html#option_mysqld_safe_user"><code class="option">--user</code></a> option from the
      command.
    </p><p>
      For further instructions for running MySQL as an unprivileged
      user, see <a class="xref" href="security.html#changing-mysql-user" title="6.1.5 How to Run MySQL as a Normal User">Section 6.1.5, “How to Run MySQL as a Normal User”</a>.
    </p><p>
      If the command fails immediately and prints <code class="literal">mysqld
      ended</code>, look for information in the error log (which by
      default is the
      <code class="filename"><em class="replaceable"><code>host_name</code></em>.err</code> file
      in the data directory).
    </p><p>
      If the server is unable to access the data directory it starts or
      read the grant tables in the <code class="literal">mysql</code> schema, it
      writes a message to its error log. Such problems can occur if you
      neglected to create the grant tables by initializing the data
      directory before proceeding to this step, or if you ran the
      command that initializes the data directory without the
      <code class="option">--user</code> option. Remove the
      <code class="filename">data</code> directory and run the command with the
      <code class="option">--user</code> option.
    </p><p>
      If you have other problems starting the server, see
      <a class="xref" href="installing.html#starting-server-troubleshooting" title="2.10.2.1 Troubleshooting Problems Starting the MySQL Server">Section 2.10.2.1, “Troubleshooting Problems Starting the MySQL Server”</a>. For more
      information about <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>, see
      <a class="xref" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script">Section 4.3.2, “<span class="command"><strong>mysqld_safe</strong></span> — MySQL Server Startup Script”</a>. For more information about systemd
      support, see <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="starting-server-troubleshooting"></a>2.10.2.1 Troubleshooting Problems Starting the MySQL Server</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46444437705760"></a><a class="indexterm" name="idm46444437704272"></a><a class="indexterm" name="idm46444437702784"></a><a class="indexterm" name="idm46444437701296"></a><p>
        This section provides troubleshooting suggestions for problems
        starting the server. For additional suggestions for Windows
        systems, see <a class="xref" href="installing.html#windows-troubleshooting" title="2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation">Section 2.3.5, “Troubleshooting a Microsoft Windows MySQL Server Installation”</a>.
      </p><p>
        If you have problems starting the server, here are some things
        to try:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Check the <a class="link" href="glossary.html#glos_error_log" title="error log">error log</a> to
            see why the server does not start. Log files are located in
            the <a class="link" href="glossary.html#glos_data_directory" title="data directory">data
            directory</a> (typically <code class="filename">C:\Program
            Files\MySQL\MySQL Server 8.0\data</code> on
            Windows, <code class="filename">/usr/local/mysql/data</code> for a
            Unix/Linux binary distribution, and
            <code class="filename">/usr/local/var</code> for a Unix/Linux source
            distribution). Look in the data directory for files with
            names of the form
            <code class="filename"><em class="replaceable"><code>host_name</code></em>.err</code>
            and
            <code class="filename"><em class="replaceable"><code>host_name</code></em>.log</code>,
            where <em class="replaceable"><code>host_name</code></em> is the name of
            your server host. Then examine the last few lines of these
            files. Use <code class="literal">tail</code> to display them:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>tail <em class="replaceable"><code>host_name</code></em>.err</code></strong>
shell&gt; <strong class="userinput"><code>tail <em class="replaceable"><code>host_name</code></em>.log</code></strong>
</pre></li><li class="listitem"><p>
            Specify any special options needed by the storage engines
            you are using. You can create a <code class="filename">my.cnf</code>
            file and specify startup options for the engines that you
            plan to use. If you are going to use storage engines that
            support transactional tables (<code class="literal">InnoDB</code>,
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a>), be sure that you have
            them configured the way you want before starting the server.
            If you are using <code class="literal">InnoDB</code> tables, see
            <a class="xref" href="innodb-storage-engine.html#innodb-configuration" title="15.8 InnoDB Configuration">Section 15.8, “InnoDB Configuration”</a> for guidelines and
            <a class="xref" href="innodb-storage-engine.html#innodb-parameters" title="15.14 InnoDB Startup Options and System Variables">Section 15.14, “InnoDB Startup Options and System Variables”</a> for option syntax.
          </p><p>
            Although storage engines use default values for options that
            you omit, Oracle recommends that you review the available
            options and specify explicit values for any options whose
            defaults are not appropriate for your installation.
          </p></li><li class="listitem"><p>
            Make sure that the server knows where to find the
            <a class="link" href="glossary.html#glos_data_directory" title="data directory">data directory</a>.
            The <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server uses this directory as
            its current directory. This is where it expects to find
            databases and where it expects to write log files. The
            server also writes the pid (process ID) file in the data
            directory.
          </p><p>
            The default data directory location is hardcoded when the
            server is compiled. To determine what the default path
            settings are, invoke <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with the
            <a class="link" href="server-administration.html#option_mysqld_verbose"><code class="option">--verbose</code></a> and
            <a class="link" href="server-administration.html#option_mysqld_help"><code class="option">--help</code></a> options. If the data
            directory is located somewhere else on your system, specify
            that location with the
            <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">--datadir</code></a> option to
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> or <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>,
            on the command line or in an option file. Otherwise, the
            server will not work properly. As an alternative to the
            <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">--datadir</code></a> option, you can
            specify <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> the location of the base
            directory under which MySQL is installed with the
            <a class="link" href="server-administration.html#sysvar_basedir"><code class="option">--basedir</code></a>, and
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> looks for the
            <code class="filename">data</code> directory there.
          </p><p>
            To check the effect of specifying path options, invoke
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> with those options followed by the
            <a class="link" href="server-administration.html#option_mysqld_verbose"><code class="option">--verbose</code></a> and
            <a class="link" href="server-administration.html#option_mysqld_help"><code class="option">--help</code></a> options. For example,
            if you change location to the directory where
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> is installed and then run the
            following command, it shows the effect of starting the
            server with a base directory of
            <code class="filename">/usr/local</code>:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>./mysqld --basedir=/usr/local --verbose --help</code></strong>
</pre><p>
            You can specify other options such as
            <a class="link" href="server-administration.html#sysvar_datadir"><code class="option">--datadir</code></a> as well, but
            <a class="link" href="server-administration.html#option_mysqld_verbose"><code class="option">--verbose</code></a> and
            <a class="link" href="server-administration.html#option_mysqld_help"><code class="option">--help</code></a> must be the last
            options.
          </p><p>
            Once you determine the path settings you want, start the
            server without <a class="link" href="server-administration.html#option_mysqld_verbose"><code class="option">--verbose</code></a> and
            <a class="link" href="server-administration.html#option_mysqld_help"><code class="option">--help</code></a>.
          </p><p>
            If <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> is currently running, you can
            find out what path settings it is using by executing this
            command:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysqladmin variables</code></strong>
</pre><p>
            Or:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysqladmin -h <em class="replaceable"><code>host_name</code></em> variables</code></strong>
</pre><p>
            <em class="replaceable"><code>host_name</code></em> is the name of the
            MySQL server host.
          </p></li><li class="listitem"><p>
            Make sure that the server can access the
            <a class="link" href="glossary.html#glos_data_directory" title="data directory">data directory</a>.
            The ownership and permissions of the data directory and its
            contents must allow the server to read and modify them.
          </p><p>
            If you get <code class="literal">Errcode 13</code> (which means
            <code class="literal">Permission denied</code>) when starting
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>, this means that the privileges of
            the data directory or its contents do not permit server
            access. In this case, you change the permissions for the
            involved files and directories so that the server has the
            right to use them. You can also start the server as
            <code class="literal">root</code>, but this raises security issues and
            should be avoided.
          </p><p>
            Change location to the data directory and check the
            ownership of the data directory and its contents to make
            sure the server has access. For example, if the data
            directory is <code class="filename">/usr/local/mysql/var</code>, use
            this command:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>ls -la /usr/local/mysql/var</code></strong>
</pre><p>
            If the data directory or its files or subdirectories are not
            owned by the login account that you use for running the
            server, change their ownership to that account. If the
            account is named <code class="literal">mysql</code>, use these
            commands:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>chown -R mysql /usr/local/mysql/var</code></strong>
shell&gt; <strong class="userinput"><code>chgrp -R mysql /usr/local/mysql/var</code></strong>
</pre><p>
            Even with correct ownership, MySQL might fail to start up if
            there is other security software running on your system that
            manages application access to various parts of the file
            system. In this case, reconfigure that software to enable
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> to access the directories it uses
            during normal operation.
          </p></li><li class="listitem"><p>
            Verify that the network interfaces the server wants to use
            are available.
          </p><p>
            If either of the following errors occur, it means that some
            other program (perhaps another <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
            server) is using the TCP/IP port or Unix socket file that
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> is trying to use:
          </p><pre data-lang="none" class="programlisting">Can't start server: Bind on TCP/IP port: Address already in use
Can't start server: Bind on unix socket...</pre><p>
            Use <span class="command"><strong>ps</strong></span> to determine whether you have
            another <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server running. If so,
            shut down the server before starting
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> again. (If another server is
            running, and you really want to run multiple servers, you
            can find information about how to do so in
            <a class="xref" href="server-administration.html#multiple-servers" title="5.8 Running Multiple MySQL Instances on One Machine">Section 5.8, “Running Multiple MySQL Instances on One Machine”</a>.)
          </p><p>
            If no other server is running, execute the command
            <code class="literal">telnet <em class="replaceable"><code>your_host_name</code></em>
            <em class="replaceable"><code>tcp_ip_port_number</code></em></code>.
            (The default MySQL port number is 3306.) Then press Enter a
            couple of times. If you do not get an error message like
            <code class="literal">telnet: Unable to connect to remote host:
            Connection refused</code>, some other program is using
            the TCP/IP port that <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> is trying to
            use. Track down what program this is and disable it, or tell
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> to listen to a different port with
            the <a class="link" href="server-administration.html#option_mysqld_port"><code class="option">--port</code></a> option. In this
            case, specify the same non-default port number for client
            programs when connecting to the server using TCP/IP.
          </p><p>
            Another reason the port might be inaccessible is that you
            have a firewall running that blocks connections to it. If
            so, modify the firewall settings to permit access to the
            port.
          </p><p>
            If the server starts but you cannot connect to it, make sure
            that you have an entry in <code class="filename">/etc/hosts</code>
            that looks like this:
          </p><pre data-lang="none" class="programlisting">127.0.0.1       localhost</pre></li><li class="listitem"><p>
            If you cannot get <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> to start, try to
            make a trace file to find the problem by using the
            <a class="link" href="server-administration.html#option_mysqld_debug"><code class="option">--debug</code></a> option. See
            <a class="xref" href="extending-mysql.html#dbug-package" title="29.5.4 The DBUG Package">Section 29.5.4, “The DBUG Package”</a>.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="testing-server"></a>2.10.3 Testing the Server</h3>

</div>

</div>

</div>
<p>
      After the data directory is initialized and you have started the
      server, perform some simple tests to make sure that it works
      satisfactorily. This section assumes that your current location is
      the MySQL installation directory and that it has a
      <code class="filename">bin</code> subdirectory containing the MySQL
      programs used here. If that is not true, adjust the command path
      names accordingly.
    </p><a class="indexterm" name="idm46444437603136"></a><a class="indexterm" name="idm46444437602048"></a><p>
      Alternatively, add the <code class="filename">bin</code> directory to your
      <code class="literal">PATH</code> environment variable setting. That enables
      your shell (command interpreter) to find MySQL programs properly,
      so that you can run a program by typing only its name, not its
      path name. See <a class="xref" href="programs.html#setting-environment-variables" title="4.2.7 Setting Environment Variables">Section 4.2.7, “Setting Environment Variables”</a>.
    </p><p>
      Use <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> to verify that the server is
      running. The following commands provide simple tests to check
      whether the server is up and responding to connections:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqladmin version</code></strong>
shell&gt; <strong class="userinput"><code>bin/mysqladmin variables</code></strong>
</pre><p>
      If you cannot connect to the server, specify a <code class="option">-u
      root</code> option to connect as <code class="literal">root</code>. If you
      have assigned a password for the <code class="literal">root</code> account
      already, you'll also need to specify <code class="option">-p</code> on the
      command line and enter the password when prompted. For example:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqladmin -u root -p version</code></strong>
Enter password: <em class="replaceable"><code>(enter root password here)</code></em>
</pre><p>
      The output from <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin version</strong></span></a> varies
      slightly depending on your platform and version of MySQL, but
      should be similar to that shown here:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqladmin version</code></strong>
mysqladmin  Ver 14.12 Distrib 8.0.22, for pc-linux-gnu on i686
...

Server version          8.0.22
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 14 days 5 hours 5 min 21 sec

Threads: 1  Questions: 366  Slow queries: 0
Opens: 0  Flush tables: 1  Open tables: 19
Queries per second avg: 0.000
</pre><p>
      To see what else you can do with <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>,
      invoke it with the <a class="link" href="programs.html#option_mysqladmin_help"><code class="option">--help</code></a>
      option.
    </p><a class="indexterm" name="idm46444437581968"></a><a class="indexterm" name="idm46444437580480"></a><p>
      Verify that you can shut down the server (include a
      <code class="option">-p</code> option if the <code class="literal">root</code> account
      has a password already):
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqladmin -u root shutdown</code></strong>
</pre><p>
      Verify that you can start the server again. Do this by using
      <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> or by invoking
      <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> directly. For example:
    </p><a class="indexterm" name="idm46444437572736"></a><a class="indexterm" name="idm46444437571248"></a><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqld_safe --user=mysql &amp;</code></strong>
</pre><p>
      If <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> fails, see
      <a class="xref" href="installing.html#starting-server-troubleshooting" title="2.10.2.1 Troubleshooting Problems Starting the MySQL Server">Section 2.10.2.1, “Troubleshooting Problems Starting the MySQL Server”</a>.
    </p><p>
      Run some simple tests to verify that you can retrieve information
      from the server. The output should be similar to that shown here.
    </p><p>
      Use <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a> to see what databases exist:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqlshow</code></strong>
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
</pre><p>
      The list of installed databases may vary, but always includes at
      least <code class="literal">mysql</code> and
      <code class="literal">information_schema</code>.
    </p><p>
      If you specify a database name, <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a>
      displays a list of the tables within the database:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysqlshow mysql</code></strong>
Database: mysql
+---------------------------+
|          Tables           |
+---------------------------+
| columns_priv              |
| component                 |
| db                        |
| default_roles             |
| engine_cost               |
| func                      |
| general_log               |
| global_grants             |
| gtid_executed             |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| password_history          |
| plugin                    |
| procs_priv                |
| proxies_priv              |
| role_edges                |
| server_cost               |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
</pre><p>
      Use the <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> program to select information
      from a table in the <code class="literal">mysql</code> schema:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>bin/mysql -e "SELECT User, Host, plugin FROM mysql.user" mysql</code></strong>
+------+-----------+-----------------------+
| User | Host      | plugin                |
+------+-----------+-----------------------+
| root | localhost | caching_sha2_password |
+------+-----------+-----------------------+
</pre><p>
      At this point, your server is running and you can access it. To
      tighten security if you have not yet assigned a password to the
      initial account, follow the instructions in
      <a class="xref" href="installing.html#default-privileges" title="2.10.4 Securing the Initial MySQL Account">Section 2.10.4, “Securing the Initial MySQL Account”</a>.
    </p><p>
      For more information about <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>,
      <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>, and <a class="link" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information"><span class="command"><strong>mysqlshow</strong></span></a>,
      see <a class="xref" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client">Section 4.5.1, “<span class="command"><strong>mysql</strong></span> — The MySQL Command-Line Client”</a>, <a class="xref" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server">Section 4.5.2, “<span class="command"><strong>mysqladmin</strong></span> — Client for Administering a MySQL Server”</a>, and
      <a class="xref" href="programs.html#mysqlshow" title="4.5.7 mysqlshow — Display Database, Table, and Column Information">Section 4.5.7, “<span class="command"><strong>mysqlshow</strong></span> — Display Database, Table, and Column Information”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="default-privileges"></a>2.10.4 Securing the Initial MySQL Account</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444437542192"></a><a class="indexterm" name="idm46444437540736"></a><a class="indexterm" name="idm46444437539248"></a><a class="indexterm" name="idm46444437538176"></a><a class="indexterm" name="idm46444437537104"></a><a class="indexterm" name="idm46444437535616"></a><a class="indexterm" name="idm46444437534544"></a><a class="indexterm" name="idm46444437533056"></a><a class="indexterm" name="idm46444437531568"></a><a class="indexterm" name="idm46444437530080"></a><a class="indexterm" name="idm46444437528592"></a><a class="indexterm" name="idm46444437527104"></a><a class="indexterm" name="idm46444437525616"></a><a class="indexterm" name="idm46444437524128"></a><a class="indexterm" name="idm46444437522640"></a><a class="indexterm" name="idm46444437521152"></a><a class="indexterm" name="idm46444437519664"></a><a class="indexterm" name="idm46444437518176"></a><a class="indexterm" name="idm46444437516688"></a><a class="indexterm" name="idm46444437515200"></a><p>
      The MySQL installation process involves initializing the data
      directory, including the grant tables in the
      <code class="literal">mysql</code> system schema that define MySQL accounts.
      For details, see <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
    </p><p>
      This section describes how to assign a password to the initial
      <code class="literal">root</code> account created during the MySQL
      installation procedure, if you have not already done so.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Alternative means for performing the process described in this
        section:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            On Windows, you can perform the process during installation
            with MySQL Installer (see <a class="xref" href="installing.html#mysql-installer" title="2.3.3 MySQL Installer for Windows">Section 2.3.3, “MySQL Installer for Windows”</a>).
          </p></li><li class="listitem"><p>
            On all platforms, the MySQL distribution includes
            <a class="link" href="programs.html#mysql-secure-installation" title="4.4.2 mysql_secure_installation — Improve MySQL Installation Security"><span class="command"><strong>mysql_secure_installation</strong></span></a>, a command-line
            utility that automates much of the process of securing a
            MySQL installation.
          </p></li><li class="listitem"><p>
            On all platforms, MySQL Workbench is available and offers the
            ability to manage user accounts (see
            <a class="xref" href="workbench.html" title="Chapter 31 MySQL Workbench">Chapter 31, <i>MySQL Workbench</i></a> ).
</p></li></ul>
</div>

</div>
<p>
      A password may already be assigned to the initial account under
      these circumstances:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          On Windows, installations performed using MySQL Installer give you the
          option of assigning a password.
        </p></li><li class="listitem"><p>
          Installation using the macOS installer generates an initial
          random password, which the installer displays to the user in a
          dialog box.
        </p></li><li class="listitem"><p>
          Installation using RPM packages generates an initial random
          password, which is written to the server error log.
        </p></li><li class="listitem"><p>
          Installations using Debian packages give you the option of
          assigning a password.
        </p></li><li class="listitem"><p>
          For data directory initialization performed manually using
          <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld --initialize</strong></span></a>,
          <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> generates an initial random
          password, marks it expired, and writes it to the server error
          log. See <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>.
</p></li></ul>
</div>
<p>
      The <code class="literal">mysql.user</code> grant table defines the initial
      MySQL user account and its access privileges. Installation of
      MySQL creates only a <code class="literal">'root'@'localhost'</code>
      superuser account that has all privileges and can do anything. If
      the <code class="literal">root</code> account has an empty password, your
      MySQL installation is unprotected: Anyone can connect to the MySQL
      server as <code class="literal">root</code> <span class="emphasis"><em>without a
      password</em></span> and be granted all privileges.
    </p><p>
      The <code class="literal">'root'@'localhost'</code> account also has a row
      in the <code class="literal">mysql.proxies_priv</code> table that enables
      granting the <a class="link" href="security.html#priv_proxy"><code class="literal">PROXY</code></a> privilege for
      <code class="literal">''@''</code>, that is, for all users and all hosts.
      This enables <code class="literal">root</code> to set up proxy users, as
      well as to delegate to other accounts the authority to set up
      proxy users. See <a class="xref" href="security.html#proxy-users" title="6.2.18 Proxy Users">Section 6.2.18, “Proxy Users”</a>.
    </p><p>
      To assign a password for the initial MySQL <code class="literal">root</code>
      account, use the following procedure. Replace
      <em class="replaceable"><code>root-password</code></em> in the examples with the
      password that you want to use.
    </p><p>
      Start the server if it is not running. For instructions, see
      <a class="xref" href="installing.html#starting-server" title="2.10.2 Starting the Server">Section 2.10.2, “Starting the Server”</a>.
    </p><p>
      The initial <code class="literal">root</code> account may or may not have a
      password. Choose whichever of the following procedures applies:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          If the <code class="literal">root</code> account exists with an initial
          random password that has been expired, connect to the server
          as <code class="literal">root</code> using that password, then choose a
          new password. This is the case if the data directory was
          initialized using <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld --initialize</strong></span></a>,
          either manually or using an installer that does not give you
          the option of specifying a password during the install
          operation. Because the password exists, you must use it to
          connect to the server. But because the password is expired,
          you cannot use the account for any purpose other than to
          choose a new password, until you do choose one.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
              If you do not know the initial random password, look in
              the server error log.
            </p></li><li class="listitem"><p>
              Connect to the server as <code class="literal">root</code> using the
              password:
            </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysql -u root -p</code></strong>
Enter password: <em class="replaceable"><code>(enter the random root password here)</code></em>
</pre></li><li class="listitem"><p>
              Choose a new password to replace the random password:
            </p><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY '<em class="replaceable"><code>root-password</code></em>';</code></strong>
</pre></li></ol>
</div>
</li><li class="listitem"><p>
          If the <code class="literal">root</code> account exists but has no
          password, connect to the server as <code class="literal">root</code>
          using no password, then assign a password. This is the case if
          you initialized the data directory using <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld
          --initialize-insecure</strong></span></a>.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
              Connect to the server as <code class="literal">root</code> using no
              password:
            </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysql -u root --skip-password</code></strong>
</pre></li><li class="listitem"><p>
              Assign a password:
            </p><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY '<em class="replaceable"><code>root-password</code></em>';</code></strong>
</pre></li></ol>
</div>
</li></ul>
</div>
<p>
      After assigning the <code class="literal">root</code> account a password,
      you must supply that password whenever you connect to the server
      using the account. For example, to connect to the server using the
      <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client, use this command:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysql -u root -p</code></strong>
Enter password: <em class="replaceable"><code>(enter root password here)</code></em>
</pre><p>
      To shut down the server with <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>, use
      this command:
    </p><pre data-lang="sql" class="programlisting">shell&gt; <strong class="userinput"><code>mysqladmin -u root -p shutdown</code></strong>
Enter password: <em class="replaceable"><code>(enter root password here)</code></em>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        For additional information about setting passwords, see
        <a class="xref" href="security.html#assigning-passwords" title="6.2.14 Assigning Account Passwords">Section 6.2.14, “Assigning Account Passwords”</a>. If you forget your
        <code class="literal">root</code> password after setting it, see
        <a class="xref" href="error-handling.html#resetting-permissions" title="B.4.3.2 How to Reset the Root Password">Section B.4.3.2, “How to Reset the Root Password”</a>.
      </p><p>
        To set up additional accounts, see
        <a class="xref" href="security.html#creating-accounts" title="6.2.8 Adding Accounts, Assigning Privileges, and Dropping Accounts">Section 6.2.8, “Adding Accounts, Assigning Privileges, and Dropping Accounts”</a>.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="automatic-start"></a>2.10.5 Starting and Stopping MySQL Automatically</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444437443392"></a><a class="indexterm" name="idm46444437441920"></a><a class="indexterm" name="idm46444437440432"></a><p>
      This section discusses methods for starting and stopping the MySQL
      server.
    </p><p>
      Generally, you start the <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server in one
      of these ways:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Invoke <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> directly. This works on any
          platform.
        </p></li><li class="listitem"><p>
          On Windows, you can set up a MySQL service that runs
          automatically when Windows starts. See
          <a class="xref" href="installing.html#windows-start-service" title="2.3.4.8 Starting MySQL as a Windows Service">Section 2.3.4.8, “Starting MySQL as a Windows Service”</a>.
        </p></li><li class="listitem"><p>
          On Unix and Unix-like systems, you can invoke
          <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>, which tries to determine the
          proper options for <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> and then runs it
          with those options. See <a class="xref" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script">Section 4.3.2, “<span class="command"><strong>mysqld_safe</strong></span> — MySQL Server Startup Script”</a>.
        </p></li><li class="listitem"><p>
          On Linux systems that support systemd, you can use it to
          control the server. See <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a>.
        </p></li><li class="listitem"><p>
          On systems that use System V-style run directories (that is,
          <code class="filename">/etc/init.d</code> and run-level specific
          directories), invoke <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a>. This
          script is used primarily at system startup and shutdown. It
          usually is installed under the name <code class="literal">mysql</code>.
          The <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a> script starts the server
          by invoking <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>. See
          <a class="xref" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script">Section 4.3.3, “<span class="command"><strong>mysql.server</strong></span> — MySQL Server Startup Script”</a>.
        </p></li><li class="listitem"><p>
          On macOS, install a launchd daemon to enable automatic MySQL
          startup at system startup. The daemon starts the server by
          invoking <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a>. For details, see
          <a class="xref" href="installing.html#osx-installation-launchd" title="2.4.3 Installing and Using the MySQL Launch Daemon">Section 2.4.3, “Installing and Using the MySQL Launch Daemon”</a>. A MySQL Preference
          Pane also provides control for starting and stopping MySQL
          through the System Preferences. See
          <a class="xref" href="installing.html#osx-installation-prefpane" title="2.4.4 Installing and Using the MySQL Preference Pane">Section 2.4.4, “Installing and Using the MySQL Preference Pane”</a>.
        </p></li><li class="listitem"><p>
          On Solaris, use the service management framework (SMF) system
          to initiate and control MySQL startup.
</p></li></ul>
</div>
<p>
      systemd, the <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> and
      <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a> scripts, Solaris SMF, and the
      macOS Startup Item (or MySQL Preference Pane) can be used to start
      the server manually, or automatically at system startup time.
      systemd, <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a>, and the Startup Item
      also can be used to stop the server.
    </p><p>
      The following table shows which option groups the server and
      startup scripts read from option files.
</p>
<div class="table">
<a name="startup-scripts-server-option-groups"></a><p class="title"><b>Table 2.14 MySQL Startup Scripts and Supported Server Option Groups</b></p>
<div class="table-contents">
<table summary="MySQL startup scripts and the server option groups they support."><col width="20%"><col width="80%"><thead><tr>
          <th scope="col">Script</th>
          <th scope="col">Option Groups</th>
        </tr></thead><tbody><tr>
          <td scope="row"><a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a></td>
          <td><code class="literal">[mysqld]</code>, <code class="literal">[server]</code>,
            <code class="literal">[mysqld-<em class="replaceable"><code>major_version</code></em>]</code></td>
        </tr><tr>
          <td scope="row"><a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a></td>
          <td><code class="literal">[mysqld]</code>, <code class="literal">[server]</code>,
            <code class="literal">[mysqld_safe]</code></td>
        </tr><tr>
          <td scope="row"><a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a></td>
          <td><code class="literal">[mysqld]</code>, <code class="literal">[mysql.server]</code>,
            <code class="literal">[server]</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
      <code class="literal">[mysqld-<em class="replaceable"><code>major_version</code></em>]</code>
      means that groups with names like
      <code class="literal">[mysqld-5.7]</code> and
      <code class="literal">[mysqld-8.0]</code> are read by servers
      having versions 5.7.x, 8.0.x, and so
      forth. This feature can be used to specify options that can be
      read only by servers within a given release series.
    </p><p>
      For backward compatibility, <a class="link" href="programs.html#mysql-server" title="4.3.3 mysql.server — MySQL Server Startup Script"><span class="command"><strong>mysql.server</strong></span></a> also
      reads the <code class="literal">[mysql_server]</code> group and
      <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> also reads the
      <code class="literal">[safe_mysqld]</code> group. To be current, you should
      update your option files to use the
      <code class="literal">[mysql.server]</code> and
      <code class="literal">[mysqld_safe]</code> groups instead.
    </p><p>
      For more information on MySQL configuration files and their
      structure and contents, see <a class="xref" href="programs.html#option-files" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="upgrading"></a>2.11 Upgrading MySQL</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#upgrade-before-you-begin">2.11.1 Before You Begin</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-paths">2.11.2 Upgrade Paths</a></span></dt><dt><span class="section"><a href="installing.html#upgrading-what-is-upgraded">2.11.3 What the MySQL Upgrade Process Upgrades</a></span></dt><dt><span class="section"><a href="installing.html#upgrading-from-previous-series">2.11.4 Changes in MySQL 8.0</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-prerequisites">2.11.5 Preparing Your Installation for Upgrade</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-binary-package">2.11.6 Upgrading MySQL Binary or Package-based Installations on Unix/Linux</a></span></dt><dt><span class="section"><a href="installing.html#updating-yum-repo">2.11.7 Upgrading MySQL with the MySQL Yum Repository</a></span></dt><dt><span class="section"><a href="installing.html#updating-apt-repo">2.11.8 Upgrading MySQL with the MySQL APT Repository</a></span></dt><dt><span class="section"><a href="installing.html#updating-sles-repo">2.11.9 Upgrading MySQL with the MySQL SLES Repository</a></span></dt><dt><span class="section"><a href="installing.html#windows-upgrading">2.11.10 Upgrading MySQL on Windows</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-docker-mysql">2.11.11 Upgrading a Docker Installation of MySQL</a></span></dt><dt><span class="section"><a href="installing.html#upgrade-troubleshooting">2.11.12 Upgrade Troubleshooting</a></span></dt><dt><span class="section"><a href="installing.html#rebuilding-tables">2.11.13 Rebuilding or Repairing Tables or Indexes</a></span></dt><dt><span class="section"><a href="installing.html#copying-databases">2.11.14 Copying MySQL Databases to Another Machine</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444437376816"></a><p>
    This section describes the steps to upgrade a MySQL installation.
  </p><p>
    Upgrading is a common procedure, as you pick up bug fixes within the
    same MySQL release series or significant features between major
    MySQL releases. You perform this procedure first on some test
    systems to make sure everything works smoothly, and then on the
    production systems.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      In the following discussion, MySQL commands that must be run using
      a MySQL account with administrative privileges include <code class="option">-u
      <code class="literal">root</code></code> on the command line to specify
      the MySQL <code class="literal">root</code> user. Commands that require a
      password for <code class="literal">root</code> also include a
      <code class="option">-p</code> option. Because <code class="option">-p</code> is
      followed by no option value, such commands prompt for the
      password. Type the password when prompted and press Enter.
    </p><p>
      SQL statements can be executed using the <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>
      command-line client (connect as <code class="literal">root</code> to ensure
      that you have the necessary privileges).
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrade-before-you-begin"></a>2.11.1 Before You Begin</h3>

</div>

</div>

</div>
<p>
      Review the information in this section before upgrading. Perform
      any recommended actions.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Understand what may occur during an upgrade. See
          <a class="xref" href="installing.html#upgrading-what-is-upgraded" title="2.11.3 What the MySQL Upgrade Process Upgrades">Section 2.11.3, “What the MySQL Upgrade Process Upgrades”</a>.
        </p></li><li class="listitem"><p>
          Protect your data by creating a backup. The backup should
          include the <code class="literal">mysql</code> system database, which
          contains the MySQL data dictionary tables and system tables.
          See <a class="xref" href="backup-and-recovery.html#backup-methods" title="7.2 Database Backup Methods">Section 7.2, “Database Backup Methods”</a>.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
            Downgrade from MySQL 8.0 to MySQL
            5.7, or from a MySQL 8.0 release
            to a previous MySQL 8.0 release, is not
            supported. The only supported alternative is to restore a
            backup taken <span class="emphasis"><em>before</em></span> upgrading. It is
            therefore imperative that you backup your data before
            starting the upgrade process.
</p>
</div>
</li><li class="listitem"><p>
          Review <a class="xref" href="installing.html#upgrade-paths" title="2.11.2 Upgrade Paths">Section 2.11.2, “Upgrade Paths”</a> to ensure that your
          intended upgrade path is supported.
        </p></li><li class="listitem"><p>
          Review <a class="xref" href="installing.html#upgrading-from-previous-series" title="2.11.4 Changes in MySQL 8.0">Section 2.11.4, “Changes in MySQL 8.0”</a> for
          changes that you should be aware of before upgrading. Some
          changes may require action.
        </p></li><li class="listitem"><p>
          Review <a class="xref" href="introduction.html#mysql-nutshell" title="1.4 What Is New in MySQL 8.0">Section 1.4, “What Is New in MySQL 8.0”</a> for deprecated and
          removed features. An upgrade may require changes with respect
          to those features if you use any of them.
        </p></li><li class="listitem"><p>
          Review <a class="xref" href="introduction.html#added-deprecated-removed" title="1.5 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.0">Section 1.5, “Server and Status Variables and Options Added, Deprecated, or Removed in
    MySQL 8.0”</a>. If you use
          deprecated or removed variables, an upgrade may require
          configuration changes.
        </p></li><li class="listitem"><p>
          Review the
          <a class="ulink" href="https://dev.mysql.com/doc/relnotes/mysql/8.0/en/" target="_top">Release
          Notes</a> for information about fixes, changes, and new
          features.
        </p></li><li class="listitem"><p>
          If you use replication, review
          <a class="xref" href="replication.html#replication-upgrade" title="17.5.3 Upgrading a Replication Setup">Section 17.5.3, “Upgrading a Replication Setup”</a>.
        </p></li><li class="listitem"><p>
          Upgrade procedures vary by platform and how the initial
          installation was performed. Use the procedure that applies to
          your current MySQL installation:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              For binary and package-based installations on non-Windows
              platforms, refer to
              <a class="xref" href="installing.html#upgrade-binary-package" title="2.11.6 Upgrading MySQL Binary or Package-based Installations on Unix/Linux">Section 2.11.6, “Upgrading MySQL Binary or Package-based Installations on Unix/Linux”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
                For supported Linux distributions, the preferred method
                for upgrading package-based installations is to use the
                MySQL software repositories (MySQL Yum Repository, MySQL
                APT Repository, and MySQL SLES Repository).
</p>
</div>
</li><li class="listitem"><p>
              For installations on an Enterprise Linux platform or
              Fedora using the MySQL Yum Repository, refer to
              <a class="xref" href="installing.html#updating-yum-repo" title="2.11.7 Upgrading MySQL with the MySQL Yum Repository">Section 2.11.7, “Upgrading MySQL with the MySQL Yum Repository”</a>.
            </p></li><li class="listitem"><p>
              For installations on Ubuntu using the MySQL APT
              repository, refer to <a class="xref" href="installing.html#updating-apt-repo" title="2.11.8 Upgrading MySQL with the MySQL APT Repository">Section 2.11.8, “Upgrading MySQL with the MySQL APT Repository”</a>.
            </p></li><li class="listitem"><p>
              For installations on SLES using the MySQL SLES repository,
              refer to <a class="xref" href="installing.html#updating-sles-repo" title="2.11.9 Upgrading MySQL with the MySQL SLES Repository">Section 2.11.9, “Upgrading MySQL with the MySQL SLES Repository”</a>.
            </p></li><li class="listitem"><p>
              For installations performed using Docker, refer to
              <a class="xref" href="installing.html#upgrade-docker-mysql" title="2.11.11 Upgrading a Docker Installation of MySQL">Section 2.11.11, “Upgrading a Docker Installation of MySQL”</a>.
            </p></li><li class="listitem"><p>
              For installations on Windows, refer to
              <a class="xref" href="installing.html#windows-upgrading" title="2.11.10 Upgrading MySQL on Windows">Section 2.11.10, “Upgrading MySQL on Windows”</a>.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          If your MySQL installation contains a large amount of data
          that might take a long time to convert after an in-place
          upgrade, it may be useful to create a test instance for
          assessing the conversions that are required and the work
          involved to perform them. To create a test instance, make a
          copy of your MySQL instance that contains the
          <code class="literal">mysql</code> database and other databases without
          the data. Run the upgrade procedure on the test instance to
          assess the work involved to perform the actual data
          conversion.
        </p></li><li class="listitem"><p>
          Rebuilding and reinstalling MySQL language interfaces is
          recommended when you install or upgrade to a new release of
          MySQL. This applies to MySQL interfaces such as PHP
          <code class="literal">mysql</code> extensions and the Perl
          <code class="literal">DBD::mysql</code> module.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrade-paths"></a>2.11.2 Upgrade Paths</h3>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Upgrade from MySQL 5.7 to 8.0 is
          supported. However, upgrade is only supported between General
          Availability (GA) releases. For MySQL 8.0, it is
          required that you upgrade from a MySQL 5.7 GA
          release (5.7.9 or higher). Upgrades from non-GA releases of
          MySQL 5.7 are not supported.
        </p></li><li class="listitem"><p>
          Upgrading to the latest release is recommended before
          upgrading to the next version. For example, upgrade to the
          latest MySQL 5.7 release before upgrading to
          MySQL 8.0.
        </p></li><li class="listitem"><p>
          Upgrade that skips versions is not supported. For example,
          upgrading directly from MySQL 5.6 to 8.0 is not
          supported.
        </p></li><li class="listitem"><p>
          Once a release series reaches General Availability (GA)
          status, upgrade within the release series (from one GA version
          to another GA version) is supported. For example, upgrading
          from MySQL 8.0.<em class="replaceable"><code>x</code></em> to
          8.0.<em class="replaceable"><code>y</code></em> is supported.
          (Upgrade involving development-status non-GA releases is not
          supported.) Skipping a release is also supported. For example,
          upgrading from MySQL
          8.0.<em class="replaceable"><code>x</code></em> to
          8.0.<em class="replaceable"><code>z</code></em> is supported.
          MySQL 8.0.11 is the first GA status release within the MySQL
          8.0 release series.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrading-what-is-upgraded"></a>2.11.3 What the MySQL Upgrade Process Upgrades</h3>

</div>

</div>

</div>
<p>
      Installing a new version of MySQL may require upgrading these
      parts of the existing installation:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <code class="literal">mysql</code> system schema, which contains
          tables that store information required by the MySQL server as
          it runs (see <a class="xref" href="server-administration.html#system-schema" title="5.3 The mysql System Schema">Section 5.3, “The mysql System Schema”</a>).
          <code class="literal">mysql</code> schema tables fall into two broad
          categories:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Data dictionary tables, which store database object
              metadata.
            </p></li><li class="listitem"><p>
              System tables (that is, the remaining non-data dictionary
              tables), which are used for other operational purposes.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Other schemas, some of which are built in and may be
          considered <span class="quote">“<span class="quote">owned</span>”</span> by the server, and others
          which are not:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              The Performance Schema,
              <code class="literal">INFORMATION_SCHEMA</code>,
              <a class="link" href="mysql-cluster.html#mysql-cluster-ndbinfo" title="22.5.10 ndbinfo: The NDB Cluster Information Database"><code class="literal">ndbinfo</code></a>, and
              <code class="literal">sys</code> schema.
            </p></li><li class="listitem"><p>
              User schemas.
</p></li></ul>
</div>
</li></ul>
</div>
<p>
      Two distinct version numbers are associated with parts of the
      installation that may require upgrading:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The data dictionary version. This applies to the data
          dictionary tables.
        </p></li><li class="listitem"><p>
          The server version, also known as the MySQL version. This
          applies to the system tables and objects in other schemas.
</p></li></ul>
</div>
<p>
      In both cases, the actual version applicable to the existing MySQL
      installation is stored in the data dictionary, and the current
      expected version is compiled into the new version of MySQL. When
      an actual version is lower than the current expected version,
      those parts of the installation associated with that version must
      be upgraded to the current version. If both versions indicate an
      upgrade is needed, the data dictionary upgrade must occur first.
    </p><p>
      As a reflection of the two distinct versions just mentioned, the
      upgrade occurs in two steps:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Step 1: Data dictionary upgrade.
        </p><p>
          This step upgrades:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              The data dictionary tables in the <code class="literal">mysql</code>
              schema. If the actual data dictionary version is lower
              than the current expected version, the server creates data
              dictionary tables with updated definitions, copies
              persisted metadata to the new tables, atomically replaces
              the old tables with the new ones, and reinitializes the
              data dictionary.
            </p></li><li class="listitem"><p>
              The Performance Schema,
              <code class="literal">INFORMATION_SCHEMA</code>, and
              <code class="literal">ndbinfo</code>.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Step 2: Server upgrade.
        </p><p>
          This step comprises all other upgrade tasks. If the server
          version of the existing MySQL installation is lower than that
          of the new installed MySQL version, everything else must be
          upgraded:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              The system tables in the <code class="literal">mysql</code> schema
              (the remaining non-data dictionary tables).
            </p></li><li class="listitem"><p>
              The <code class="literal">sys</code> schema.
            </p></li><li class="listitem"><p>
              User schemas.
</p></li></ul>
</div>
</li></ul>
</div>
<p>
      The data dictionary upgrade (step 1) is the responsibility of the
      server, which performs this task as necessary at startup unless
      invoked with an option that prevents it from doing so. The option
      is <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=NONE</code></a> as of MySQL
      8.0.16, <a class="link" href="server-administration.html#option_mysqld_no-dd-upgrade"><code class="option">--no-dd-upgrade</code></a> prior to
      MySQL 8.0.16.
    </p><p>
      If the data dictionary is out of date but the server is prevented
      from upgrading it, the server will not run and exits with an
      error. For example:
    </p><pre data-lang="none" class="programlisting">[ERROR] [MY-013381] [Server] Server shutting down because upgrade is
required, yet prohibited by the command line option '--upgrade=NONE'.
[ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.</pre><p>
      Some changes to the responsibility for step 2 occurred in MySQL
      8.0.16:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Prior to MySQL 8.0.16, <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
          upgrades the Performance Schema, the
          <code class="literal">INFORMATION_SCHEMA</code>, and the objects
          described in step 2. The DBA is expected to invoke
          <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> manually after starting the
          server.
        </p></li><li class="listitem"><p>
          As of MySQL 8.0.16, the server performs all tasks previously
          handled by <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>. Although
          upgrading remains a two-step operation, the server performs
          them both, resulting in a simpler process.
</p></li></ul>
</div>
<p>
      Depending on the version of MySQL to which you are upgrading, the
      instructions in <a class="xref" href="installing.html#upgrade-procedure-inplace" title="In-Place Upgrade">In-Place Upgrade</a> and
      <a class="xref" href="installing.html#upgrade-procedure-logical" title="Logical Upgrade">Logical Upgrade</a> indicate whether the
      server performs all upgrade tasks or whether you must also invoke
      <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> after server startup.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Because the server upgrades the Performance Schema,
        <code class="literal">INFORMATION_SCHEMA</code>, and the objects described
        in step 2 as of MySQL 8.0.16, <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
        is unneeded and is deprecated as of that version, and will be
        removed in a future MySQL version.
</p>
</div>
<p>
      Most aspects of what occurs during step 2 are the same prior to
      and as of MySQL 8.0.16, although different command options may be
      needed to achieve a particular effect.
    </p><p>
      As of MySQL 8.0.16, the <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade</code></a>
      server option controls whether and how the server performs an
      automatic upgrade at startup:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          With no option or with
          <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=AUTO</code></a>, the server
          upgrades anything it determines to be out of date (steps 1 and
          2).
        </p></li><li class="listitem"><p>
          With <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=NONE</code></a>, the server
          upgrades nothing (skips steps 1 and 2), but also exits with an
          error if the data dictionary must be upgraded. It is not
          possible to run the server with an out-of-date data
          dictionary; the server insists on either upgrading it or
          exiting.
        </p></li><li class="listitem"><p>
          With <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a>, the
          server upgrades the data dictionary, the Performance Schema,
          and the <code class="literal">INFORMATION_SCHEMA</code>, if necessary
          (step 1). Note that following an upgrade with this option,
          Group Replication cannot be started, because system tables on
          which the replication internals depend are not updated, and
          reduced functionality might also be apparent in other areas.
        </p></li><li class="listitem"><p>
          With <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=FORCE</code></a>, the
          server upgrades the data dictionary, the Performance Schema,
          and the <code class="literal">INFORMATION_SCHEMA</code>, if necessary
          (step 1), and forces an upgrade of everything else (step 2).
          Expect server startup to take longer with this option because
          the server checks all objects in all schemas.
</p></li></ul>
</div>
<p>
      <code class="literal">FORCE</code> is useful to force step 2 actions to be
      performed if the server thinks they are not necessary. One way
      that <code class="literal">FORCE</code> differs from <code class="literal">AUTO</code>
      is that with <code class="literal">FORCE</code>, the server re-creates
      system tables such as help tables or time zone tables if they are
      missing.
    </p><p>
      The following list shows upgrade commands prior to MySQL 8.0.16
      and the equivalent commands for MySQL 8.0.16 and higher:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Perform a normal upgrade (steps 1 and 2 as necessary):
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Prior to MySQL 8.0.16: <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> followed
              by <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
            </p></li><li class="listitem"><p>
              As of MySQL 8.0.16: <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a>
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Perform only step 1 as necessary:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Prior to MySQL 8.0.16: It is not possible to perform all
              upgrade tasks described in step 1 while excluding those
              described in step 2. However, you can avoid upgrading user
              schemas and the <code class="literal">sys</code> schema using
              <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> followed by
              <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> with the
              <a class="link" href="programs.html#option_mysql_upgrade_upgrade-system-tables"><code class="option">--upgrade-system-tables</code></a>
              and
              <a class="link" href="programs.html#option_mysql_upgrade_skip-sys-schema"><code class="option">--skip-sys-schema</code></a>
              options.
            </p></li><li class="listitem"><p>
              As of MySQL 8.0.16: <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld
              --upgrade=MINIMAL</strong></span></a>
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Perform step 1 as necessary, and force step 2:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              Prior to MySQL 8.0.16: <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> followed
              by <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade --force</strong></span></a>
            </p></li><li class="listitem"><p>
              As of MySQL 8.0.16: <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld
              --upgrade=FORCE</strong></span></a>
</p></li></ul>
</div>
</li></ul>
</div>
<p>
      Prior to MySQL 8.0.16, certain <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
      options affect the actions it performs. The following table shows
      which server <code class="option">--upgrade</code> option values to use as of
      MySQL 8.0.16 to achieve similar effects. (These are not
      necessarily exact equivalents because a given
      <code class="option">--upgrade</code> option value may have additional
      effects.)
</p>
<div class="informaltable">
<table summary="Server --upgrade option value equivalents to certain mysql_upgrade options."><col width="50%"><col width="50%"><thead><tr>
          <th scope="col">mysql_upgrade Option</th>
          <th scope="col">Server Option</th>
        </tr></thead><tbody><tr>
          <td scope="row"><a class="link" href="programs.html#option_mysql_upgrade_skip-sys-schema"><code class="option">--skip-sys-schema</code></a></td>
          <td><a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=NONE</code></a> or
            <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a></td>
        </tr><tr>
          <td scope="row"><a class="link" href="programs.html#option_mysql_upgrade_upgrade-system-tables"><code class="option">--upgrade-system-tables</code></a></td>
          <td><a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=NONE</code></a> or
            <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a></td>
        </tr><tr>
          <td scope="row"><a class="link" href="programs.html#option_mysql_upgrade_force"><code class="option">--force</code></a></td>
          <td><a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=FORCE</code></a></td>
</tr></tbody></table>
</div>
<p>
      Additional notes about what occurs during upgrade step 2:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Step 2 installs the <code class="literal">sys</code> schema if it is not
          installed, and upgrades it to the current version otherwise.
          An error occurs if a <code class="literal">sys</code> schema exists but
          has no <code class="literal">version</code> view, on the assumption that
          its absence indicates a user-created schema:
        </p><pre data-lang="none" class="programlisting">A sys schema exists with no sys.version view. If
you have a user created sys schema, this must be renamed for the
upgrade to succeed.</pre><p>
          To upgrade in this case, remove or rename the existing
          <code class="literal">sys</code> schema first. Then perform the upgrade
          procedure again. (It may be necessary to force step 2.)
        </p><p>
          To prevent the <code class="literal">sys</code> schema check:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              As of MySQL 8.0.16: Start the server with the
              <code class="option">--upgrade=NONE</code> or
              <code class="option">--upgrade=MINIMAL</code> option.
            </p></li><li class="listitem"><p>
              Prior to MySQL 8.0.16: Invoke
              <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> with the
              <a class="link" href="programs.html#option_mysql_upgrade_skip-sys-schema"><code class="option">--skip-sys-schema</code></a>
              option.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Step 2 processes all tables in all user schemas as necessary.
          Table checking might take a long time to complete. Each table
          is locked and therefore unavailable to other sessions while it
          is being processed. Check and repair operations can be
          time-consuming, particularly for large tables. Table checking
          uses the <code class="literal">FOR UPGRADE</code> option of the
          <a class="link" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement"><code class="literal">CHECK TABLE</code></a> statement. For
          details about what this option entails, see
          <a class="xref" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement">Section 13.7.3.2, “CHECK TABLE Statement”</a>.
        </p><p>
          To prevent table checking:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              As of MySQL 8.0.16: Start the server with the
              <code class="option">--upgrade=NONE</code> or
              <code class="option">--upgrade=MINIMAL</code> option.
            </p></li><li class="listitem"><p>
              Prior to MySQL 8.0.16: Invoke
              <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> with the
              <a class="link" href="programs.html#option_mysql_upgrade_upgrade-system-tables"><code class="option">--upgrade-system-tables</code></a>
              option.
</p></li></ul>
</div>
<p>
          To force table checking:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              As of MySQL 8.0.16: Start the server with the
              <code class="option">--upgrade=FORCE</code> option.
            </p></li><li class="listitem"><p>
              Prior to MySQL 8.0.16: Invoke
              <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> with the
              <a class="link" href="programs.html#option_mysql_upgrade_force"><code class="option">--force</code></a> option.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          Step 2 saves the MySQL version number in a file named
          <code class="filename">mysql_upgrade_info</code> in the data directory.
        </p><a class="indexterm" name="idm46444437188384"></a><a class="indexterm" name="idm46444437186896"></a><a class="indexterm" name="idm46444437185408"></a><p>
          To ignore the <code class="filename">mysql_upgrade_info</code> file and
          perform the check regardless:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              As of MySQL 8.0.16: Start the server with the
              <code class="option">--upgrade=FORCE</code> option.
            </p></li><li class="listitem"><p>
              Prior to MySQL 8.0.16: Invoke
              <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> with the
              <a class="link" href="programs.html#option_mysql_upgrade_force"><code class="option">--force</code></a> option.
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
            The <code class="filename">mysql_upgrade_info</code> file is
            deprecated and will be removed in a future MySQL version.
</p>
</div>
</li><li class="listitem"><p>
          Step 2 marks all checked and repaired tables with the current
          MySQL version number. This ensures that the next time upgrade
          checking occurs with the same version of the server, it can be
          determined whether there is any need to check or repair a
          given table again.
        </p></li><li class="listitem"><p>
          Step 2 upgrades the system tables to ensure that they have the
          current structure. This is true whether the server or
          <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> performs the step. With
          respect to the content of the help tables and time zone
          tables, <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> does not load either
          type of table, whereas the server loads the help tables, but
          not the time zone tables. (That is, prior to MySQL 8.0.16, the
          server loads the help tables only at data directory
          initialization time. As of MySQL 8.0.16, it loads the help
          tables at initialization and upgrade time.) The procedure for
          loading time zone tables is platform dependent and requires
          decision making by the DBA, so it cannot be done
          automatically.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrading-from-previous-series"></a>2.11.4 Changes in MySQL 8.0</h3>

</div>

</div>

</div>
<p>
      Before upgrading to MySQL 8.0, review the changes
      described in this section to identify those that apply to your
      current MySQL installation and applications. Perform any
      recommended actions.
    </p><p>
      Changes marked as <span class="bold"><strong>Incompatible
      change</strong></span> are incompatibilities with earlier versions of
      MySQL, and may require your attention <span class="emphasis"><em>before
      upgrading</em></span>. Our aim is to avoid these changes, but
      occasionally they are necessary to correct problems that would be
      worse than an incompatibility between releases. If an upgrade
      issue applicable to your installation involves an incompatibility,
      follow the instructions given in the description.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#upgrade-data-dictionary-changes" title="Data Dictionary Changes">Data Dictionary Changes</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-caching-sha2-password" title="caching_sha2_password as the Preferred Authentication Plugin">caching_sha2_password as the Preferred Authentication Plugin</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-configuration-changes" title="Configuration Changes">Configuration Changes</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-server-changes" title="Server Changes">Server Changes</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-innodb-changes" title="InnoDB Changes">InnoDB Changes</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-sql-changes" title="SQL Changes">SQL Changes</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="upgrade-data-dictionary-changes"></a>Data Dictionary Changes</h4>

</div>

</div>

</div>
<p>
        MySQL Server 8.0 incorporates a global data
        dictionary containing information about database objects in
        transactional tables. In previous MySQL series, dictionary data
        was stored in metadata files and nontransactional system tables.
        As a result, the upgrade procedure requires that you verify the
        upgrade readiness of your installation by checking specific
        prerequisites. For more information, see
        <a class="xref" href="installing.html#upgrade-prerequisites" title="2.11.5 Preparing Your Installation for Upgrade">Section 2.11.5, “Preparing Your Installation for Upgrade”</a>. A data
        dictionary-enabled server entails some general operational
        differences; see
        <a class="xref" href="data-dictionary.html#data-dictionary-usage-differences" title="14.7 Data Dictionary Usage Differences">Section 14.7, “Data Dictionary Usage Differences”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrade-caching-sha2-password"></a>caching_sha2_password as the Preferred Authentication Plugin</h4>

</div>

</div>

</div>
<a class="indexterm" name="idm46444437155904"></a><p>
        The <code class="literal">caching_sha2_password</code> and
        <code class="literal">sha256_password</code> authentication plugins
        provide more secure password encryption than the
        <code class="literal">mysql_native_password</code> plugin, and
        <code class="literal">caching_sha2_password</code> provides better
        performance than <code class="literal">sha256_password</code>. Due to
        these superior security and performance characteristics of
        <code class="literal">caching_sha2_password</code>, it is as of MySQL 8.0
        the preferred authentication plugin, and is also the default
        authentication plugin rather than
        <code class="literal">mysql_native_password</code>. This change affects
        both the server and the <code class="literal">libmysqlclient</code> client
        library:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For the server, the default value of the
            <a class="link" href="server-administration.html#sysvar_default_authentication_plugin"><code class="literal">default_authentication_plugin</code></a>
            system variable changes from
            <code class="literal">mysql_native_password</code> to
            <code class="literal">caching_sha2_password</code>.
          </p><p>
            This change applies only to new accounts created after
            installing or upgrading to MySQL 8.0 or higher. For accounts
            already existing in an upgraded installation, their
            authentication plugin remains unchanged. Existing users who
            wish to switch to <code class="literal">caching_sha2_password</code>
            can do so using the <a class="link" href="sql-statements.html#alter-user" title="13.7.1.1 ALTER USER Statement"><code class="literal">ALTER
            USER</code></a> statement:
          </p><pre data-lang="sql" class="programlisting">ALTER USER <em class="replaceable"><code>user</code></em>
  IDENTIFIED WITH caching_sha2_password
  BY '<em class="replaceable"><code>password</code></em>';
</pre></li><li class="listitem"><p>
            The <code class="literal">libmysqlclient</code> library treats
            <code class="literal">caching_sha2_password</code> as the default
            authentication plugin rather than
            <code class="literal">mysql_native_password</code>.
</p></li></ul>
</div>
<p>
        The following sections discuss the implications of the more
        prominent role of <code class="literal">caching_sha2_password</code>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#upgrade-caching-sha2-password-compatibility-issues" title="caching_sha2_password Compatibility Issues and Solutions">caching_sha2_password Compatibility Issues and Solutions</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-caching-sha2-password-compatible-connectors" title="caching_sha2_password-Compatible Clients and Connectors">caching_sha2_password-Compatible Clients and Connectors</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-caching-sha2-password-root-account" title="caching_sha2_password and the root Administrative Account">caching_sha2_password and the root Administrative Account</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-caching-sha2-password-replication" title="caching_sha2_password and Replication">caching_sha2_password and Replication</a></p></li></ul>
</div>
<h5><a name="upgrade-caching-sha2-password-compatibility-issues"></a>caching_sha2_password Compatibility Issues and Solutions</h5>

<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
          If your MySQL installation must serve pre-8.0 clients and you
          encounter compatibility issues after upgrading to MySQL 8.0 or
          higher, the simplest way to address those issues and restore
          pre-8.0 compatibility is to reconfigure the server to revert
          to the previous default authentication plugin
          (<code class="literal">mysql_native_password</code>). For example, use
          these lines in the server option file:
        </p><pre data-lang="ini" class="programlisting">[mysqld]
default_authentication_plugin=mysql_native_password</pre><p>
          That setting enables pre-8.0 clients to connect to 8.0 servers
          until such time as the clients and connectors in use at your
          installation are upgraded to know about
          <code class="literal">caching_sha2_password</code>. However, the setting
          should be viewed as temporary, not as a long term or permanent
          solution, because it causes new accounts created with the
          setting in effect to forego the improved authentication
          security provided by <code class="literal">caching_sha2_password</code>.
</p>
</div>
<p>
        The use of <code class="literal">caching_sha2_password</code> offers more
        secure password hashing than
        <code class="literal">mysql_native_password</code> (and consequent
        improved client connection authentication). However, it also has
        compatibility implications that may affect existing MySQL
        installations:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Clients and connectors that have not been updated to know
            about <code class="literal">caching_sha2_password</code> may have
            trouble connecting to a MySQL 8.0 server configured with
            <code class="literal">caching_sha2_password</code> as the default
            authentication plugin, even to use accounts that do not
            authenticate with <code class="literal">caching_sha2_password</code>.
            This issue occurs because the server specifies the name of
            its default authentication plugin to clients. If a client or
            connector is based on a client/server protocol
            implementation that does not gracefully handle an
            unrecognized default authentication plugin, it may fail with
            an error such as one of these:
          </p><a class="indexterm" name="idm46444437118320"></a><a class="indexterm" name="idm46444437116544"></a><a class="indexterm" name="idm46444437114768"></a><pre data-lang="none" class="programlisting">Authentication plugin 'caching_sha2_password' is not supported</pre><pre data-lang="none" class="programlisting">Authentication plugin 'caching_sha2_password' cannot be loaded:
dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2):
image not found</pre><pre data-lang="none" class="programlisting">Warning: mysqli_connect(): The server requested authentication
method unknown to the client [caching_sha2_password]</pre><p>
            For information about writing connectors to gracefully
            handle requests from the server for unknown default
            authentication plugins, see
            <a class="xref" href="security.html#pluggable-authentication-connector-writing" title="Authentication Plugin Connector-Writing Considerations">Authentication Plugin Connector-Writing Considerations</a>.
          </p></li><li class="listitem"><p>
            Clients that use an account that authenticates with
            <code class="literal">caching_sha2_password</code> must use either a
            secure connection (made using TCP using TLS/SSL credentials,
            a Unix socket file, or shared memory), or an unencrypted
            connection that supports password exchange using an RSA key
            pair. This security requirement does not apply to
            <code class="literal">mysql_native_passsword</code>, so the switch to
            <code class="literal">caching_sha2_password</code> may require
            additional configuration (see
            <a class="xref" href="security.html#caching-sha2-pluggable-authentication" title="6.4.1.2 Caching SHA-2 Pluggable Authentication">Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”</a>).
            However, client connections in MySQL 8.0 prefer use of
            TLS/SSL by default, so clients that already conform to that
            preference may need no additional configuration.
          </p></li><li class="listitem"><p>
            Clients and connectors that have not been updated to know
            about <code class="literal">caching_sha2_password</code>
            <span class="emphasis"><em>cannot</em></span> connect to accounts that
            authenticate with <code class="literal">caching_sha2_password</code>
            because they do not recognize this plugin as valid. (This is
            a particular instance of how client/server authentication
            plugin compatibility requirements apply, as discussed at
            <a class="xref" href="security.html#pluggable-authentication-compatibility" title="Authentication Plugin Client/Server Compatibility">Authentication Plugin Client/Server Compatibility</a>.)
            To work around this issue, relink clients against
            <code class="literal">libmysqlclient</code> from MySQL 8.0 or higher,
            or obtain an updated connector that recognizes
            <code class="literal">caching_sha2_password</code>.
          </p></li><li class="listitem"><p>
            Because <code class="literal">caching_sha2_password</code> is also now
            the default authentication plugin in the
            <code class="literal">libmysqlclient</code> client library,
            authentication requires an extra round trip in the
            client/server protocol for connections from MySQL 8.0
            clients to accounts that use
            <code class="literal">mysql_native_password</code> (the previous
            default authentication plugin), unless the client program is
            invoked with a
            <a class="link" href="programs.html#option_general_default-auth"><code class="option">--default-auth=mysql_native_password</code></a>
            option.
</p></li></ul>
</div>
<p>
        The <code class="literal">libmysqlclient</code> client library for pre-8.0
        MySQL versions is able to connect to MySQL 8.0 servers (except
        for accounts that authenticate with
        <code class="literal">caching_sha2_password</code>). That means pre-8.0
        clients based on <code class="literal">libmysqlclient</code> should also
        be able to connect. Examples:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Standard MySQL clients such as <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> and
            <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> are
            <code class="literal">libmysqlclient</code>-based.
          </p></li><li class="listitem"><p>
            The DBD::mysql driver for Perl DBI is
            <code class="literal">libmysqlclient</code>-based.
          </p></li><li class="listitem"><p>
            MySQL Connector/Python has a C Extension module that is
            <code class="literal">libmysqlclient</code>-based. To use it, include
            the <code class="literal">use_pure=False</code> option at connect
            time.
</p></li></ul>
</div>
<p>
        When an existing MySQL 8.0 installation is upgraded to MySQL
        8.0.4 or higher, some older
        <code class="literal">libmysqlclient</code>-based clients may
        <span class="quote">“<span class="quote">automatically</span>”</span> upgrade if they are dynamically
        linked, because they use the new client library installed by the
        upgrade. For example, if the DBD::mysql driver for Perl DBI uses
        dynamic linking, it can use the
        <code class="literal">libmysqlclient</code> in place after an upgrade to
        MySQL 8.0.4 or higher, with this result:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Prior to the upgrade, DBI scripts that use DBD::mysql can
            connect to a MySQL 8.0 server, except for accounts that
            authenticate with <code class="literal">caching_sha2_password</code>.
          </p></li><li class="listitem"><p>
            After the upgrade, the same scripts become able to use
            <code class="literal">caching_sha2_password</code> accounts as well.
</p></li></ul>
</div>
<p>
        However, the preceding results occur because
        <code class="literal">libmysqlclient</code> instances from MySQL 8.0
        installations prior to 8.0.4 are binary compatible: They both
        use a shared library major version number of 21. For clients
        linked to <code class="literal">libmysqlclient</code> from MySQL 5.7 or
        older, they link to a shared library with a different version
        number that is not binary compatible. In this case, the client
        must be recompiled against <code class="literal">libmysqlclient</code>
        from 8.0.4 or higher for full compatibility with MySQL 8.0
        servers and <code class="literal">caching_sha2_password</code> accounts.
      </p><p>
        MySQL Connector/J 5.1 through 8.0.8 is able to connect to MySQL 8.0 servers,
        except for accounts that authenticate with
        <code class="literal">caching_sha2_password</code>. (Connector/J 8.0.9 or higher
        is required to connect to
        <code class="literal">caching_sha2_password</code> accounts.)
      </p><p>
        Clients that use an implementation of the client/server protocol
        other than <code class="literal">libmysqlclient</code> may need to be
        upgraded to a newer version that understands the new
        authentication plugin. For example, in PHP, MySQL connectivity
        usually is based on <code class="literal">mysqlnd</code>, which currently
        does not know about <code class="literal">caching_sha2_password</code>.
        Until an updated version of <code class="literal">mysqlnd</code> is
        available, the way to enable PHP clients to connect to MySQL 8.0
        is to reconfigure the server to revert to
        <code class="literal">mysql_native_password</code> as the default
        authentication plugin, as previously discussed.
      </p><p>
        If a client or connector supports an option to explicitly
        specify a default authentication plugin, use it to name a plugin
        other than <code class="literal">caching_sha2_password</code>. Examples:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Some MySQL clients support a
            <a class="link" href="programs.html#option_general_default-auth"><code class="option">--default-auth</code></a> option.
            (Standard MySQL clients such as <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> and
            <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> support this option but can
            successfully connect to 8.0 servers without it. However,
            other clients may support a similar option. If so, it is
            worth trying it.)
          </p></li><li class="listitem"><p>
            Programs that use the <code class="literal">libmysqlclient</code> C
            API can call the
            <a class="link" href="connectors-apis.html#mysql-options" title="28.7.6.50 mysql_options()"><code class="literal">mysql_options()</code></a> function
            with the <code class="literal">MYSQL_DEFAULT_AUTH</code> option.
          </p></li><li class="listitem"><p>
            MySQL Connector/Python scripts that use the native Python implementation of
            the client/server protocol can specify the
            <code class="literal">auth_plugin</code> connection option.
            (Alternatively, use the Connector/Python C Extension, which is able to
            connect to MySQL 8.0 servers without the need for
            <code class="literal">auth_plugin</code>.)
</p></li></ul>
</div>
<h5><a name="upgrade-caching-sha2-password-compatible-connectors"></a>caching_sha2_password-Compatible Clients and Connectors</h5>
<p>
        If a client or connector is available that has been updated to
        know about <code class="literal">caching_sha2_password</code>, using it is
        the best way to ensure compatibility when connecting to a MySQL
        8.0 server configured with
        <code class="literal">caching_sha2_password</code> as the default
        authentication plugin.
      </p><p>
        These clients and connectors have been upgraded to support
        <code class="literal">caching_sha2_password</code>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            The <code class="literal">libmysqlclient</code> client library in
            MySQL 8.0 (8.0.4 or higher). Standard MySQL clients such as
            <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> and <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>
            are <code class="literal">libmysqlclient</code>-based, so they are
            compatible as well.
          </p></li><li class="listitem"><p>
            The <code class="literal">libmysqlclient</code> client library in
            MySQL 5.7 (5.7.23 or higher). Standard MySQL clients such as
            <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> and <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a>
            are <code class="literal">libmysqlclient</code>-based, so they are
            compatible as well.
          </p></li><li class="listitem"><p>
            MySQL Connector/C++ 1.1.11 or higher or 8.0.7 or higher.
          </p></li><li class="listitem"><p>
            MySQL Connector/J 8.0.9 or higher.
          </p></li><li class="listitem"><p>
            MySQL Connector/NET 8.0.10 or higher (through the classic MySQL
            protocol).
          </p></li><li class="listitem"><p>
            MySQL Connector/Node.js 8.0.9 or higher.
          </p></li><li class="listitem"><p>
            PHP: the X DevAPI PHP extension (mysql_xdevapi) supports
            <code class="literal">caching_sha2_password</code>.
          </p><p>
            PHP: the PDO_MySQL and ext/mysqli extensions do not support
            <code class="literal">caching_sha2_password</code>. In addition, when
            used with PHP versions before 7.1.16 and PHP 7.2 before
            7.2.4, they fail to connect with
            <code class="literal">default_authentication_plugin=caching_sha2_password</code>
            even if <code class="literal">caching_sha2_password</code> is not
            used.
</p></li></ul>
</div>
<h5><a name="upgrade-caching-sha2-password-root-account"></a>caching_sha2_password and the root Administrative Account</h5>
<p>
        For upgrades to MySQL 8.0, the authentication plugin existing
        accounts remains unchanged, including the plugin for the
        <code class="literal">'root'@'localhost'</code> administrative account.
      </p><p>
        For new MySQL 8.0 installations, when you initialize the data
        directory (using the instructions at
        <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>), the
        <code class="literal">'root'@'localhost'</code> account is created, and
        that account uses <code class="literal">caching_sha2_password</code> by
        default. To connect to the server following data directory
        initialization, you must therefore use a client or connector
        that supports <code class="literal">caching_sha2_password</code>. If you
        can do this but prefer that the <code class="literal">root</code> account
        use <code class="literal">mysql_native_password</code> after installation,
        install MySQL and initialize the data directory as you normally
        would. Then connect to the server as <code class="literal">root</code> and
        use <a class="link" href="sql-statements.html#alter-user" title="13.7.1.1 ALTER USER Statement"><code class="literal">ALTER USER</code></a> as follows to
        change the account authentication plugin and password:
      </p><pre data-lang="sql" class="programlisting">ALTER USER 'root'@'localhost'
  IDENTIFIED WITH mysql_native_password
  BY '<em class="replaceable"><code>password</code></em>';
</pre><p>
        If the client or connector that you use does not yet support
        <code class="literal">caching_sha2_password</code>, you can use a modified
        data directory-initialization procedure that associates the
        <code class="literal">root</code> account with
        <code class="literal">mysql_native_password</code> as soon as the account
        is created. To do so, use either of these techniques:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Supply a
            <a class="link" href="server-administration.html#sysvar_default_authentication_plugin"><code class="option">--default-authentication-plugin=mysql_native_password</code></a>
            option along with
            <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> or
            <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>.
          </p></li><li class="listitem"><p>
            Set
            <a class="link" href="server-administration.html#sysvar_default_authentication_plugin"><code class="literal">default_authentication_plugin</code></a>
            to <code class="literal">mysql_native_password</code> in an option
            file, and name that option file using a
            <a class="link" href="server-administration.html#option_mysqld_defaults-file"><code class="option">--defaults-file</code></a> option along
            with <a class="link" href="server-administration.html#option_mysqld_initialize"><code class="option">--initialize</code></a> or
            <a class="link" href="server-administration.html#option_mysqld_initialize-insecure"><code class="option">--initialize-insecure</code></a>. (In
            this case, if you continue to use that option file for
            subsequent server startups, new accounts will be created
            with <code class="literal">mysql_native_password</code> rather than
            <code class="literal">caching_sha2_password</code> unless you remove
            the
            <a class="link" href="server-administration.html#sysvar_default_authentication_plugin"><code class="literal">default_authentication_plugin</code></a>
            setting from the option file.)
</p></li></ul>
</div>
<h5><a name="upgrade-caching-sha2-password-replication"></a>caching_sha2_password and Replication</h5>
<p>
        In replication scenarios for which all servers have been
        upgraded to MySQL 8.0.4 or higher, slave/replica connections to
        master/primary servers can use accounts that authenticate with
        <code class="literal">caching_sha2_password</code>. For such connections,
        the same requirement applies as for other clients that use
        accounts that authenticate with
        <code class="literal">caching_sha2_password</code>: Use a secure
        connection or RSA-based password exchange.
      </p><p>
        To connect to a <code class="literal">caching_sha2_password</code> account
        for master/slave replication:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Use any of the following <a class="link" href="sql-statements.html#change-master-to" title="13.4.2.1 CHANGE MASTER TO Statement"><code class="literal">CHANGE MASTER
            TO</code></a> options:
          </p><pre data-lang="sql" class="programlisting">MASTER_SSL = 1
GET_MASTER_PUBLIC_KEY = 1
MASTER_PUBLIC_KEY_PATH='<em class="replaceable"><code>path to RSA public key file</code></em>'
</pre></li><li class="listitem"><p>
            Alternatively, you can use the RSA public key-related
            options if the required keys are supplied at server startup.
</p></li></ul>
</div>
<p>
        To connect to a <code class="literal">caching_sha2_password</code> account
        for Group Replication:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For MySQL built using OpenSSL, set any of the following
            system variables:
          </p><pre data-lang="sql" class="programlisting">SET GLOBAL group_replication_recovery_use_ssl = ON;
SET GLOBAL group_replication_recovery_get_public_key = 1;
SET GLOBAL group_replication_recovery_public_key_path = '<em class="replaceable"><code>path to RSA public key file</code></em>';
</pre></li><li class="listitem"><p>
            Alternatively, you can use the RSA public key-related
            options if the required keys are supplied at server startup.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrade-configuration-changes"></a>Configuration Changes</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="bold"><strong>Incompatible change</strong></span>: A
            MySQL storage engine is now responsible for providing its
            own partitioning handler, and the MySQL server no longer
            provides generic partitioning support.
            <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> and
            <code class="literal">NDB</code> are the only storage engines that
            provide a native partitioning handler that is supported in
            MySQL 8.0. A partitioned table using any other
            storage engine must be altered—either to convert it to
            <code class="literal">InnoDB</code> or <code class="literal">NDB</code>, or to
            remove its partitioning—<span class="emphasis"><em>before</em></span>
            upgrading the server, else it cannot be used afterwards.
          </p><p>
            For information about converting <code class="literal">MyISAM</code>
            tables to <code class="literal">InnoDB</code>, see
            <a class="xref" href="innodb-storage-engine.html#converting-tables-to-innodb" title="15.6.1.5 Converting Tables from MyISAM to InnoDB">Section 15.6.1.5, “Converting Tables from MyISAM to InnoDB”</a>.
          </p><p>
            A table creation statement that would result in a
            partitioned table using a storage engine without such
            support fails with an error
            (<span class="errorcode">ER_CHECK_NOT_IMPLEMENTED</span>) in MySQL
            8.0. If you import databases from a dump file
            created in MySQL 5.7 (or earlier) using
            <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> into a MySQL 8.0
            server, you must make sure that any statements creating
            partitioned tables do not also specify an unsupported
            storage engine, either by removing any references to
            partitioning, or by specifying the storage engine as
            <code class="literal">InnoDB</code> or allowing it to be set as
            <code class="literal">InnoDB</code> by default.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              The procedure given at
              <a class="xref" href="installing.html#upgrade-prerequisites" title="2.11.5 Preparing Your Installation for Upgrade">Section 2.11.5, “Preparing Your Installation for Upgrade”</a>, describes how to
              identify partitioned tables that must be altered before
              upgrading to MySQL 8.0.
</p>
</div>
<p>
            See
            <a class="xref" href="partitioning.html#partitioning-limitations-storage-engines" title="23.6.2 Partitioning Limitations Relating to Storage Engines">Section 23.6.2, “Partitioning Limitations Relating to Storage Engines”</a>,
            for further information.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Incompatible change</strong></span>:
            Several server error codes are not used and have been
            removed (for a list, see
            <a class="xref" href="introduction.html#mysql-nutshell-removals" title="Features Removed in MySQL 8.0">Features Removed in MySQL 8.0</a>). Applications
            that test specifically for any of them should be updated.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Important change</strong></span>: The
            default character set has changed from
            <code class="literal">latin1</code> to <code class="literal">utf8mb4</code>.
            These system variables are affected:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                The default value of the
                <a class="link" href="server-administration.html#sysvar_character_set_server"><code class="literal">character_set_server</code></a>
                and
                <a class="link" href="server-administration.html#sysvar_character_set_database"><code class="literal">character_set_database</code></a>
                system variables has changed from
                <code class="literal">latin1</code> to <code class="literal">utf8mb4</code>.
              </p></li><li class="listitem"><p>
                The default value of the
                <a class="link" href="server-administration.html#sysvar_collation_server"><code class="literal">collation_server</code></a> and
                <a class="link" href="server-administration.html#sysvar_collation_database"><code class="literal">collation_database</code></a>
                system variables has changed from
                <code class="literal">latin1_swedish_ci</code> to
                <code class="literal">utf8mb4_0900_ai_ci</code>.
</p></li></ul>
</div>
<p>
            As a result, the default character set and collation for new
            objects differ from previously unless an explicit character
            set and collation are specified. This includes databases and
            objects within them, such as tables, views, and stored
            programs. Assuming that the previous defaults were used, one
            way to preserve them is to start the server with these lines
            in the <code class="filename">my.cnf</code> file:
          </p><pre data-lang="ini" class="programlisting">[mysqld]
character_set_server=latin1
collation_server=latin1_swedish_ci</pre><p>
            In a replicated setting, when upgrading from MySQL 5.7 to
            8.0, it is advisable to change the default character set
            back to the character set used in MySQL 5.7 before
            upgrading. After the upgrade is completed, the default
            character set can be changed to <code class="literal">utf8mb4</code>.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Incompatible change</strong></span>: As of
            MySQL 8.0.11, it is prohibited to start the server with a
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
            setting that is different from the setting used when the
            server was initialized. The restriction is necessary because
            collations used by various data dictionary table fields are
            based on the
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
            setting that was defined when the server was initialized,
            and restarting the server with a different setting would
            introduce inconsistencies with respect to how identifiers
            are ordered and compared.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrade-server-changes"></a>Server Changes</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            In MySQL 8.0.11, several deprecated features related to
            account management have been removed, such as use of the
            <code class="literal">GRANT</code> statement to modify
            nonprivilege characteristics of user accounts, the
            <code class="literal">NO_AUTO_CREATE_USER</code> SQL mode, the
            <code class="literal">PASSWORD()</code> function, and the
            <code class="option">old_passwords</code> system variable.
          </p><p>
            Replication from MySQL 5.7 to 8.0 of statements that refer
            to these removed features can cause replication failure.
            Applications that use any of the removed features should be
            revised to avoid them and use alternatives when possible, as
            described in <a class="xref" href="introduction.html#mysql-nutshell-removals" title="Features Removed in MySQL 8.0">Features Removed in MySQL 8.0</a>.
          </p><p>
            To avoid a startup failure on MySQL 8.0, remove any instance
            of <code class="literal">NO_AUTO_CREATE_USER</code> from
            <a class="link" href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> system variable
            settings in MySQL option files.
          </p><p>
            Loading a dump file that includes the
            <code class="literal">NO_AUTO_CREATE_USER</code> SQL mode in stored
            program definitions into a MySQL 8.0 server causes a
            failure. As of MySQL 5.7.24 and MySQL 8.0.13,
            <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> removes
            <code class="literal">NO_AUTO_CREATE_USER</code> from stored program
            definitions. Dump files created with an earlier version of
            <code class="literal">mysqldump</code> must be modified manually to
            remove instances of <code class="literal">NO_AUTO_CREATE_USER</code>.
          </p></li><li class="listitem"><p>
            In MySQL 8.0.11, these deprecated compatibility SQL modes
            were removed: <code class="literal">DB2</code>,
            <code class="literal">MAXDB</code>, <code class="literal">MSSQL</code>,
            <code class="literal">MYSQL323</code>, <code class="literal">MYSQL40</code>,
            <code class="literal">ORACLE</code>, <code class="literal">POSTGRESQL</code>,
            <code class="literal">NO_FIELD_OPTIONS</code>,
            <code class="literal">NO_KEY_OPTIONS</code>,
            <code class="literal">NO_TABLE_OPTIONS</code>. They can no longer be
            assigned to the <code class="literal">sql_mode</code> system variable
            or used as permitted values for the
            <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>
            <a class="link" href="programs.html#option_mysqldump_compatible"><code class="option">--compatible</code></a> option.
          </p><p>
            Removal of <code class="literal">MAXDB</code> means that the
            <code class="literal">TIMESTAMP</code> data type for
            <a class="link" href="sql-statements.html#create-table" title="13.1.20 CREATE TABLE Statement"><code class="literal">CREATE TABLE</code></a> or
            <a class="link" href="sql-statements.html#alter-table" title="13.1.9 ALTER TABLE Statement"><code class="literal">ALTER TABLE</code></a> is no longer
            treated as <a class="link" href="data-types.html#datetime" title="11.2.2 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a>.
          </p><p>
            Replication from MySQL 5.7 to 8.0 of statements that refer
            to the removed SQL modes can cause replication failure. This
            includes replication of <code class="literal">CREATE</code> statements
            for stored programs (stored procedures and functions,
            triggers, and events) that are executed while the current
            <a class="link" href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> value includes any
            of the removed modes. Applications that use any of the
            removed modes should be revised to avoid them.
          </p></li><li class="listitem"><p>
            As of MySQL 8.0.3, spatial data types permit an
            <code class="literal">SRID</code> attribute, to explicitly indicate
            the spatial reference system (SRS) for values stored in the
            column. See <a class="xref" href="data-types.html#spatial-type-overview" title="11.4.1 Spatial Data Types">Section 11.4.1, “Spatial Data Types”</a>.
          </p><p>
            A spatial column with an explicit <code class="literal">SRID</code>
            attribute is SRID-restricted: The column takes only values
            with that ID, and <code class="literal">SPATIAL</code> indexes on the
            column become subject to use by the optimizer. The optimizer
            ignores <code class="literal">SPATIAL</code> indexes on spatial
            columns with no <code class="literal">SRID</code> attribute. See
            <a class="xref" href="optimization.html#spatial-index-optimization" title="8.3.3 SPATIAL Index Optimization">Section 8.3.3, “SPATIAL Index Optimization”</a>. If you want
            the optimizer to consider <code class="literal">SPATIAL</code> indexes
            on spatial columns that are not SRID-restricted, each such
            column should be modified:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                Verify that all values within the column have the same
                SRID. To determine the SRIDs contained in a geometry
                column <em class="replaceable"><code>col_name</code></em>, use the
                following query:
              </p><pre data-lang="sql" class="programlisting">SELECT DISTINCT ST_SRID(<em class="replaceable"><code>col_name</code></em>) FROM <em class="replaceable"><code>tbl_name</code></em>;
</pre><p>
                If the query returns more than one row, the column
                contains a mix of SRIDs. In that case, modify its
                contents so all values have the same SRID.
              </p></li><li class="listitem"><p>
                Redefine the column to have an explicit
                <code class="literal">SRID</code> attribute.
              </p></li><li class="listitem"><p>
                Recreate the <code class="literal">SPATIAL</code> index.
</p></li></ul>
</div>
</li><li class="listitem"><p>
            Several spatial functions were removed in MySQL 8.0.0 due to
            a spatial function namespace change that implemented an
            <code class="literal">ST_</code> prefix for functions that perform an
            exact operation, or an <code class="literal">MBR</code> prefix for
            functions that perform an operation based on minimum
            bounding rectangles. The use of removed spatial functions in
            generated column definitions could cause an upgrade failure.
            Before upgrading, run <a class="link" href="programs.html#mysqlcheck" title="4.5.3 mysqlcheck — A Table Maintenance Program"><span class="command"><strong>mysqlcheck
            --check-upgrade</strong></span></a> for removed spatial functions and
            replace any that you find with their <code class="literal">ST_</code>
            or <code class="literal">MBR</code> named replacements. For a list of
            removed spatial functions, refer to
            <a class="xref" href="introduction.html#mysql-nutshell-removals" title="Features Removed in MySQL 8.0">Features Removed in MySQL 8.0</a>.
          </p></li><li class="listitem"><p>
            The <a class="link" href="security.html#priv_backup-admin"><code class="literal">BACKUP_ADMIN</code></a> privilege is
            automatically granted to users with the
            <a class="link" href="security.html#priv_reload"><code class="literal">RELOAD</code></a> privilege when
            performing an in-place upgrade to MySQL 8.0.3 or higher.
          </p></li><li class="listitem"><p>
            From MySQL 8.0.13, because of differences between row-based
            or mixed replication mode and statement-based replication
            mode in the way that temporary tables are handled, there are
            new restrictions on switching the binary logging format at
            runtime.

</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                  <code class="literal">SET @@SESSION.binlog_format</code> cannot
                  be used if the session has any open temporary tables.
                </p></li><li class="listitem"><p>
                  <code class="literal">SET @@global.binlog_format</code> and
                  <code class="literal">SET @@persist.binlog_format</code> cannot
                  be used if any replication channel has any open
                  temporary tables. <code class="literal">SET
                  @@persist_only.binlog_format</code> is allowed if
                  replication channels have open temporary tables,
                  because unlike <code class="literal">PERSIST</code>,
                  <code class="literal">PERSIST_ONLY</code> does not modify the
                  runtime global system variable value.
                </p></li><li class="listitem"><p>
                  <code class="literal">SET @@global.binlog_format</code> and
                  <code class="literal">SET @@persist.binlog_format</code> cannot
                  be used if any replication channel applier is running.
                  This is because the change only takes effect on a
                  replication channel when its applier is restarted, at
                  which time the replication channel might have open
                  temporary tables. This behavior is more restrictive
                  than before. <code class="literal">SET
                  @@persist_only.binlog_format</code> is allowed if
                  any replication channel applier is running.
</p></li></ul>
</div>
<p>
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrade-innodb-changes"></a>InnoDB Changes</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <a class="link" href="information-schema.html" title="Chapter 25 INFORMATION_SCHEMA Tables"><code class="literal">INFORMATION_SCHEMA</code></a> views based
            on <code class="literal">InnoDB</code> system tables were replaced by
            internal system views on data dictionary tables. Affected
            <code class="literal">InnoDB</code>
            <a class="link" href="information-schema.html" title="Chapter 25 INFORMATION_SCHEMA Tables"><code class="literal">INFORMATION_SCHEMA</code></a> views were
            renamed:
</p>
<div class="table">
<a name="innodb-new-is-views-upgrade"></a><p class="title"><b>Table 2.15 Renamed InnoDB Information Schema Views</b></p>
<div class="table-contents">
<table summary="InnoDB Information Schema views that were renamed in MySQL 8.0."><col width="50%"><col width="50%"><thead><tr>
                <th scope="col">Old Name</th>
                <th scope="col">New Name</th>
              </tr></thead><tbody><tr>
                <td scope="row"><code class="literal">INNODB_SYS_COLUMNS</code></td>
                <td><code class="literal">INNODB_COLUMNS</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_DATAFILES</code></td>
                <td><code class="literal">INNODB_DATAFILES</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_FIELDS</code></td>
                <td><code class="literal">INNODB_FIELDS</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_FOREIGN</code></td>
                <td><code class="literal">INNODB_FOREIGN</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_FOREIGN_COLS</code></td>
                <td><code class="literal">INNODB_FOREIGN_COLS</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_INDEXES</code></td>
                <td><code class="literal">INNODB_INDEXES</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_TABLES</code></td>
                <td><code class="literal">INNODB_TABLES</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_TABLESPACES</code></td>
                <td><code class="literal">INNODB_TABLESPACES</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_TABLESTATS</code></td>
                <td><code class="literal">INNODB_TABLESTATS</code></td>
              </tr><tr>
                <td scope="row"><code class="literal">INNODB_SYS_VIRTUAL</code></td>
                <td><code class="literal">INNODB_VIRTUAL</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"><p>
            After upgrading to MySQL 8.0.3 or higher, update any scripts
            that reference previous <code class="literal">InnoDB</code>
            <a class="link" href="information-schema.html" title="Chapter 25 INFORMATION_SCHEMA Tables"><code class="literal">INFORMATION_SCHEMA</code></a> view names.
          </p></li><li class="listitem"><p>
            The <a class="ulink" href="http://www.zlib.net/" target="_top">zlib library</a>
            version bundled with MySQL was raised from version 1.2.3 to
            version 1.2.11.
          </p><p>
            The zlib <code class="literal">compressBound()</code> function in zlib
            1.2.11 returns a slightly higher estimate of the buffer size
            required to compress a given length of bytes than it did in
            zlib version 1.2.3. The <code class="literal">compressBound()</code>
            function is called by <code class="literal">InnoDB</code> functions
            that determine the maximum row size permitted when creating
            compressed <code class="literal">InnoDB</code> tables or inserting and
            updating rows in compressed <code class="literal">InnoDB</code>
            tables. As a result,
            <a class="link" href="sql-statements.html#create-table" title="13.1.20 CREATE TABLE Statement"><code class="literal">CREATE TABLE
            ... ROW_FORMAT=COMPRESSED</code></a>,
            <a class="link" href="sql-statements.html#insert" title="13.2.6 INSERT Statement"><code class="literal">INSERT</code></a>, and
            <a class="link" href="sql-statements.html#update" title="13.2.13 UPDATE Statement"><code class="literal">UPDATE</code></a> operations with row
            sizes very close to the maximum row size that were
            successful in earlier releases could now fail. To avoid this
            issue, test <a class="link" href="sql-statements.html#create-table" title="13.1.20 CREATE TABLE Statement"><code class="literal">CREATE TABLE</code></a>
            statements for compressed <code class="literal">InnoDB</code> tables
            with large rows on a MySQL 8.0 test instance prior to
            upgrading.
          </p></li><li class="listitem"><p>
            With the introduction of the
            <a class="link" href="innodb-storage-engine.html#sysvar_innodb_directories"><code class="literal">--innodb-directories</code></a>
            feature, the location of file-per-table and general
            tablespace files created with an absolute path or in a
            location outside of the data directory should be added to
            the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_directories"><code class="literal">innodb_directories</code></a>
            argument value. Otherwise, <code class="literal">InnoDB</code> is not
            able to locate these files during recovery. To view
            tablespace file locations, query the
            <a class="link" href="information-schema.html#files-table" title="25.14 The INFORMATION_SCHEMA FILES Table"><code class="literal">INFORMATION_SCHEMA.FILES</code></a> table:
          </p><pre data-lang="sql" class="programlisting">SELECT TABLESPACE_NAME, FILE_NAME FROM INFORMATION_SCHEMA.FILES \G</pre></li><li class="listitem"><p>
            Undo logs can no longer reside in the system tablespace. In
            MySQL 8.0, undo logs reside in two undo
            tablespaces by default. For more information, see
            <a class="xref" href="innodb-storage-engine.html#innodb-undo-tablespaces" title="15.6.3.4 Undo Tablespaces">Section 15.6.3.4, “Undo Tablespaces”</a>.
          </p><p>
            When upgrading from MySQL 5.7 to MySQL
            8.0, any undo tablespaces that exist in the
            MySQL 5.7 instance are removed and replaced by two new
            default undo tablespaces. Default undo tablespaces are
            created in the location defined by the
            <a class="link" href="innodb-storage-engine.html#sysvar_innodb_undo_directory"><code class="literal">innodb_undo_directory</code></a>
            variable. If the
            <a class="link" href="innodb-storage-engine.html#sysvar_innodb_undo_directory"><code class="literal">innodb_undo_directory</code></a>
            variable is undefined, undo tablespaces are created in the
            data directory. Upgrade from MySQL 5.7 to MySQL 8.0 requires
            a slow shutdown which ensures that undo tablespaces in the
            MySQL 5.7 instance are empty, permitting them to be removed
            safely.
          </p><p>
            When upgrading to MySQL 8.0.14 or later from an earlier
            MySQL 8.0 release, undo tablespaces that exist in the
            pre-upgrade instance as a result of an
            <a class="link" href="innodb-storage-engine.html#sysvar_innodb_undo_tablespaces"><code class="literal">innodb_undo_tablespaces</code></a>
            setting greater than 2 are treated as user-defined undo
            tablespaces, which can be deactivated and dropped using
            <a class="link" href="sql-statements.html#alter-tablespace" title="13.1.10 ALTER TABLESPACE Statement"><code class="literal">ALTER UNDO
            TABLESPACE</code></a> and
            <a class="link" href="sql-statements.html#drop-tablespace" title="13.1.33 DROP TABLESPACE Statement"><code class="literal">DROP UNDO
            TABLESPACE</code></a> syntax, respectively, after upgrading.
            Upgrade within the MySQL 8.0 release series may not always
            require a slow shutdown which means that existing undo
            tablespaces could contain undo logs. Therefore, existing
            undo tablespaces are not removed by the upgrade process.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Incompatible change</strong></span>: As of
            MySQL 8.0.17, the
            <a class="link" href="sql-statements.html#create-tablespace" title="13.1.21 CREATE TABLESPACE Statement"><code class="literal">CREATE
            TABLESPACE ... ADD DATAFILE</code></a> clause does not permit
            circular directory references. For example, the circular
            directory reference (<code class="literal">/../</code>) in the
            following statement is not permitted:
          </p><pre data-lang="sql" class="programlisting">CREATE TABLESPACE ts1 ADD DATAFILE ts1.ibd '<em class="replaceable"><code>any_directory</code></em>/../ts1.ibd';
</pre><p>
            An exception to the restriction exists on Linux, where a
            circular directory reference is permitted if the preceding
            directory is a symbolic link. For example, the data file
            path in the example above is permitted if
            <em class="replaceable"><code>any_directory</code></em> is a symbolic link.
            (It is still permitted for data file paths to begin with
            '<code class="literal">../</code>'.)
          </p><p>
            To avoid upgrade issues, remove any circular directory
            references from tablespace data file paths before upgrading
            to MySQL 8.0.17 or higher. To inspect tablespace paths,
            query the
            <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.46.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INFORMATION_SCHEMA.INNODB_DATAFILES</code></a>
            table.
          </p></li><li class="listitem"><p>
            Due to a regression introduced in MySQL 8.0.14, in-place
            upgrade on a case sensitive file system from MySQL 5.7 or a
            MySQL 8.0 release prior to MySQL 8.0.14 to MySQL 8.0.16
            failed for instances with partitioned tables and
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names=1</code></a>.
            The failure was caused by a case mismatch issue related to
            partitioned table file names. The fix that introduced the
            regression was reverted, which permits upgrades to MySQL
            8.0.17 from MySQL 5.7 or MySQL 8.0 releases prior to MySQL
            8.0.14 to function as normal. However, the regression is
            still present in the MySQL 8.0.14, 8.0.15, and 8.0.16
            releases.
          </p><p>
            In-place upgrade on a case sensitive file system from MySQL
            8.0.14, 8.0.15, or 8.0.16 to MySQL 8.0.17 fails with the
            following error when starting the server after upgrading
            binaries or packages to MySQL 8.0.17 if partitioned tables
            are present and
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names=1</code></a>:
          </p><pre class="programlisting">Upgrading from server version <em class="replaceable"><code>version_number</code></em> with 
partitioned tables and lower_case_table_names == 1 on a case sensitive file 
system may cause issues, and is therefore prohibited. To upgrade anyway, restart 
the new server version with the command line option 'upgrade=FORCE'. When 
upgrade is completed, please execute 'RENAME TABLE <em class="replaceable"><code>part_table_name</code></em> 
TO <em class="replaceable"><code>new_table_name</code></em>; RENAME TABLE <em class="replaceable"><code>new_table_name</code></em> 
TO <em class="replaceable"><code>part_table_name</code></em>;' for each of the partitioned tables. 
Please see the documentation for further information.
</pre><p>
            If you encounter this error when upgrading to MySQL 8.0.17,
            perform the following workaround:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
                Restart the server with
                <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=force</code></a> to force
                the upgrade operation to proceed.
              </p></li><li class="listitem"><p>
                Identify partitioned table file names with lowercase
                partition name delimiters <code class="literal">(#p#</code> or
                <code class="literal">#sp#</code>):
              </p><pre data-lang="sql" class="programlisting">mysql&gt; SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_NAME LIKE '%#p#%' OR FILE_NAME LIKE '%#sp#%';</pre></li><li class="listitem"><p>
                For each file identified, rename the associated table
                using a temporary name, then rename the table back to
                its original name.
              </p><pre data-lang="sql" class="programlisting">mysql&gt; RENAME TABLE <em class="replaceable"><code>table_name</code></em> TO <em class="replaceable"><code>temporary_table_name</code></em>; 
mysql&gt; RENAME TABLE <em class="replaceable"><code>temporary_table_name</code></em> TO <em class="replaceable"><code>table_name</code></em>;
</pre></li><li class="listitem"><p>
                Verify that there are no partitioned table file names
                lowercase partition name delimiters (an empty result set
                should be returned).
              </p><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_NAME LIKE '%#p#%' OR FILE_NAME LIKE '%#sp#%';</code></strong>
Empty set (0.00 sec)
</pre></li><li class="listitem"><p>
                Run <a class="link" href="sql-statements.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Statement"><code class="literal">ANALYZE TABLE</code></a> on each
                renamed table to update the optimizer statistics in the
                <code class="literal">mysql.innodb_index_stats</code> and
                <code class="literal">mysql.innodb_table_stats</code> tables.
</p></li></ol>
</div>
<p>
            Because of the regression still present in the MySQL 8.0.14,
            8.0.15, and 8.0.16 releases, importing partitioned tables
            from MySQL 8.0.14, 8.0.15, or 8.0.16 to MySQL 8.0.17 is not
            supported on case sensitive file systems where
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names=1</code></a>.
            Attempting to do so results in a <span class="quote">“<span class="quote">Tablespace is
            missing for table</span>”</span> error.
          </p></li><li class="listitem"><p>
            MySQL uses delimiter strings when constructing tablespace
            names and file names for table partitions. A
            <span class="quote">“<span class="quote"><code class="literal">#p#</code></span>”</span> delimiter string
            precedes partition names, and an
            <span class="quote">“<span class="quote"><code class="literal">#sp#</code></span>”</span> delimiter string
            precedes subpartition names, as shown:
          </p><pre class="programlisting"><em class="replaceable"><code>schema_name</code></em>.<em class="replaceable"><code>table_name</code></em>#p#<em class="replaceable"><code>partition_name</code></em>#sp#<em class="replaceable"><code>subpartition_name</code></em>
<em class="replaceable"><code>table_name</code></em>#p#<em class="replaceable"><code>partition_name</code></em>#sp#<em class="replaceable"><code>subpartition_name</code></em>.ibd  
</pre><p>
            Historically, delimiter strings have been uppercase
            (<code class="literal">#P#</code> and <code class="literal">#SP#</code>) on
            case-sensitive file systems such as Linux, and lowercase
            (<code class="literal">#p#</code> and <code class="literal">#sp#</code>) on
            case-insensitive file systems such as Windows. As of MySQL
            8.0.19, delimiter strings are lowercase on all file systems.
            This change prevents issues when migrating data directories
            between case-sensitive and case-insensitive file systems.
            Uppercase delimiter strings are no longer used.
          </p><p>
            Additionally, partition tablespace names and file names
            generated based on user-specified partition or subpartition
            names, which can be specified in uppercase or lowercase, are
            now generated (and stored internally) in lowercase
            regardless of the
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
            setting to ensure case-insensitivity. For example, if a
            table partition is created with the name
            <code class="literal">PART_1</code>, the tablespace name and file name
            are generated in lowercase:
          </p><pre class="programlisting"><em class="replaceable"><code>schema_name</code></em>.<em class="replaceable"><code>table_name</code></em>#p#<em class="replaceable"><code>part_1</code></em>
<em class="replaceable"><code>table_name</code></em>#p#<em class="replaceable"><code>part_1</code></em>.ibd  
</pre><p>
            During upgrade, MySQL checks and modifies if necessary:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                Partition file names on disk and in the data dictionary
                to ensure lowercase delimiters and partition names.
              </p></li><li class="listitem"><p>
                Partition metadata in the data dictionary for related
                issues introduced by previous bug fixes.
              </p></li><li class="listitem"><p>
                <code class="literal">InnoDB</code> statistics data for related
                issues introduced by previous bug fixes.
</p></li></ul>
</div>
<p>
            During tablespace import operations, partition tablespace
            file names on disk are checked and modified if necessary to
            ensure lowercase delimiters and partition names.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrade-sql-changes"></a>SQL Changes</h4>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="bold"><strong>Incompatible change</strong></span>: As of
            MySQL 8.0.13, the deprecated <code class="literal">ASC</code> or
            <code class="literal">DESC</code> qualifiers for <code class="literal">GROUP
            BY</code> clauses have been removed. Queries that
            previously relied on <code class="literal">GROUP BY</code> sorting may
            produce results that differ from previous MySQL versions. To
            produce a given sort order, provide an <code class="literal">ORDER
            BY</code> clause.
          </p><p>
            Queries and stored program definitions from MySQL 8.0.12 or
            lower that use <code class="literal">ASC</code> or
            <code class="literal">DESC</code> qualifiers for <code class="literal">GROUP
            BY</code> clauses should be amended. Otherwise, upgrading
            to MySQL 8.0.13 or higher may fail, as may replicating to
            MySQL 8.0.13 or higher slave servers.
          </p></li><li class="listitem"><p>
            Some keywords may be reserved in MySQL 8.0 that
            were not reserved in MySQL 5.7. See
            <a class="xref" href="language-structure.html#keywords" title="9.3 Keywords and Reserved Words">Section 9.3, “Keywords and Reserved Words”</a>. This can cause words previously
            used as identifiers to become illegal. To fix affected
            statements, use identifier quoting. See
            <a class="xref" href="language-structure.html#identifiers" title="9.2 Schema Object Names">Section 9.2, “Schema Object Names”</a>.
          </p></li><li class="listitem"><p>
            After upgrading, it is recommended that you test optimizer
            hints specified in application code to ensure that the hints
            are still required to achieve the desired optimization
            strategy. Optimizer enhancements can sometimes render
            certain optimizer hints unnecessary. In some cases, an
            unnecessary optimizer hint may even be counterproductive.
          </p></li><li class="listitem"><p>
            <span class="bold"><strong>Incompatible change</strong></span>: In
            MySQL 5.7, specifying a <code class="literal">FOREIGN KEY</code>
            definition for an <code class="literal">InnoDB</code> table without a
            <code class="literal">CONSTRAINT
            <em class="replaceable"><code>symbol</code></em></code> clause, or
            specifying the <code class="literal">CONSTRAINT</code> keyword without
            a <code class="literal">symbol</code>, causes
            <code class="literal">InnoDB</code> to use a generated constraint
            name. That behavior changed in MySQL 8.0, with
            <code class="literal">InnoDB</code> using the <code class="literal">FOREIGN KEY
            <em class="replaceable"><code>index_name</code></em></code> value
            instead of a generated name. Because constraint names must
            be unique per schema (database), the change caused errors
            due to foreign key index names that were not unique per
            schema. To avoid such errors, the new constraint naming
            behavior has been reverted in MySQL 8.0.16, and
            <code class="literal">InnoDB</code> once again uses a generated
            constraint name.
          </p><p>
            For consistency with <code class="literal">InnoDB</code>,
            <code class="literal">NDB</code> releases based on MySQL 8.0.16 or
            higher use a generated constraint name if the
            <code class="literal">CONSTRAINT
            <em class="replaceable"><code>symbol</code></em></code> clause is not
            specified, or the <code class="literal">CONSTRAINT</code> keyword is
            specified without a <code class="literal">symbol</code>.
            <code class="literal">NDB</code> releases based on MySQL 5.7 and
            earlier MySQL 8.0 releases used the <code class="literal">FOREIGN KEY
            <em class="replaceable"><code>index_name</code></em></code> value.
          </p><p>
            The changes described above may introduce incompatibilities
            for applications that depend on the previous foreign key
            constraint naming behavior.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrade-prerequisites"></a>2.11.5 Preparing Your Installation for Upgrade</h3>

</div>

</div>

</div>
<p>
      Before upgrading to the latest MySQL 8.0 release,
      ensure the upgrade readiness of your current MySQL
      5.7 or MySQL 8.0 server instance by
      performing the preliminary checks described below. The upgrade
      process may fail otherwise.
    </p><p>
      The same checks and others can be performed using the
      MySQL Shell upgrade checker utility. For more information, see
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-upgrade.html" target="_top">Upgrade Checker Utility</a>.
    </p><p>
      Preliminary checks:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          The following issues must not be present:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
              There must be no tables that use obsolete data types or
              functions.
            </p><p>
              In-place upgrade to MySQL 8.0 is not supported if tables
              contain old temporal columns in pre-5.6.4 format
              (<a class="link" href="data-types.html#time" title="11.2.3 The TIME Type"><code class="literal">TIME</code></a>,
              <a class="link" href="data-types.html#datetime" title="11.2.2 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a>, and
              <a class="link" href="data-types.html#datetime" title="11.2.2 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> columns without
              support for fractional seconds precision). If your tables
              still use the old temporal column format, upgrade them
              using <a class="link" href="sql-statements.html#repair-table" title="13.7.3.5 REPAIR TABLE Statement"><code class="literal">REPAIR TABLE</code></a> before
              attempting an in-place upgrade to MySQL 8.0. For more
              information, see
              <a class="ulink" href="https://dev.mysql.com/doc/refman/5.7/en/upgrading-from-previous-series.html#upgrade-server-changes" target="_top">Server Changes</a>.
            </p></li><li class="listitem"><p>
              There must be no orphan <code class="filename">.frm</code> files.
            </p></li><li class="listitem"><p>
              Triggers must not have a missing or empty definer or an
              invalid creation context (indicated by the
              <code class="literal">character_set_client</code>,
              <code class="literal">collation_connection</code>, <code class="literal">Database
              Collation</code> attributes displayed by
              <a class="link" href="sql-statements.html#show-triggers" title="13.7.7.38 SHOW TRIGGERS Statement"><code class="literal">SHOW TRIGGERS</code></a> or the
              <code class="literal">INFORMATION_SCHEMA</code>
              <a class="link" href="information-schema.html#triggers-table" title="25.40 The INFORMATION_SCHEMA TRIGGERS Table"><code class="literal">TRIGGERS</code></a> table). Any such
              triggers must be dumped and restored to fix the issue.
</p></li></ul>
</div>
<p>
          To check for these issues, execute this command:
        </p><pre data-lang="terminal" class="programlisting">mysqlcheck -u root -p --all-databases --check-upgrade</pre><p>
          If <a class="link" href="programs.html#mysqlcheck" title="4.5.3 mysqlcheck — A Table Maintenance Program"><span class="command"><strong>mysqlcheck</strong></span></a> reports any errors, correct
          the issues.
        </p></li><li class="listitem"><p>
          There must be no partitioned tables that use a storage engine
          that does not have native partitioning support. To identify
          such tables, execute this query:
        </p><pre data-lang="sql" class="programlisting">SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE NOT IN ('innodb', 'ndbcluster')
AND CREATE_OPTIONS LIKE '%partitioned%';</pre><p>
          Any table reported by the query must be altered to use
          <code class="literal">InnoDB</code> or be made nonpartitioned. To change
          a table storage engine to <code class="literal">InnoDB</code>, execute
          this statement:
        </p><pre data-lang="sql" class="programlisting">ALTER TABLE <em class="replaceable"><code>table_name</code></em> ENGINE = INNODB;
</pre><p>
          For information about converting <code class="literal">MyISAM</code>
          tables to <code class="literal">InnoDB</code>, see
          <a class="xref" href="innodb-storage-engine.html#converting-tables-to-innodb" title="15.6.1.5 Converting Tables from MyISAM to InnoDB">Section 15.6.1.5, “Converting Tables from MyISAM to InnoDB”</a>.
        </p><p>
          To make a partitioned table nonpartitioned, execute this
          statement:
        </p><pre data-lang="sql" class="programlisting">ALTER TABLE <em class="replaceable"><code>table_name</code></em> REMOVE PARTITIONING;
</pre></li><li class="listitem"><p>
          Some keywords may be reserved in MySQL 8.0 that
          were not reserved previously. See <a class="xref" href="language-structure.html#keywords" title="9.3 Keywords and Reserved Words">Section 9.3, “Keywords and Reserved Words”</a>.
          This can cause words previously used as identifiers to become
          illegal. To fix affected statements, use identifier quoting.
          See <a class="xref" href="language-structure.html#identifiers" title="9.2 Schema Object Names">Section 9.2, “Schema Object Names”</a>.
        </p></li><li class="listitem"><p>
          There must be no tables in the MySQL 5.7
          <code class="literal">mysql</code> system database that have the same
          name as a table used by the MySQL 8.0 data
          dictionary. To identify tables with those names, execute this
          query:
        </p><pre data-lang="sql" class="programlisting">SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE LOWER(TABLE_SCHEMA) = 'mysql'
and LOWER(TABLE_NAME) IN
(
'catalogs',
'character_sets',
'check_constraints',
'collations',
'column_statistics',
'column_type_elements',
'columns',
'dd_properties',
'events',
'foreign_key_column_usage',
'foreign_keys',
'index_column_usage',
'index_partitions',
'index_stats',
'indexes',
'parameter_type_elements',
'parameters',
'resource_groups',
'routines',
'schemata',
'st_spatial_reference_systems',
'table_partition_values',
'table_partitions',
'table_stats',
'tables',
'tablespace_files',
'tablespaces',
'triggers',
'view_routine_usage',
'view_table_usage'
);</pre><p>
          Any tables reported by the query must be dropped or renamed
          (use <a class="link" href="sql-statements.html#rename-table" title="13.1.36 RENAME TABLE Statement"><code class="literal">RENAME TABLE</code></a>). This may
          also entail changes to applications that use the affected
          tables.
        </p></li><li class="listitem"><p>
          There must be no tables that have foreign key constraint names
          longer than 64 characters. Use this query to identify tables
          with constraint names that are too long:
        </p><pre data-lang="sql" class="programlisting">SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME IN
  (SELECT LEFT(SUBSTR(ID,INSTR(ID,'/')+1),
               INSTR(SUBSTR(ID,INSTR(ID,'/')+1),'_ibfk_')-1)
   FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN
   WHERE LENGTH(SUBSTR(ID,INSTR(ID,'/')+1))&gt;64);</pre><p>
          For a table with a constraint name that exceeds 64 characters,
          drop the constraint and add it back with constraint name that
          does not exceed 64 characters (use <a class="link" href="sql-statements.html#alter-table" title="13.1.9 ALTER TABLE Statement"><code class="literal">ALTER
          TABLE</code></a>).
        </p></li><li class="listitem"><p>
          The must be no obsolete SQL modes defined in your
          <a class="link" href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> system variable
          setting. Attempting to use an obsolete SQL mode will cause a
          startup failure on MySQL 8.0. Applications that
          use obsolete SQL modes should also be revised to avoid them.
          For information about SQL modes removed in MySQL
          8.0, see
          <a class="xref" href="installing.html#upgrade-server-changes" title="Server Changes">Server Changes</a>.
        </p></li><li class="listitem"><p>
          There must be no views with explicitly defined columns names
          that exceed 64 characters (views with column names up to 255
          characters were permitted in MySQL 5.7). To avoid upgrade
          errors, such views should be altered before upgrading.
          Currently, the only method of identify views with column names
          that exceed 64 characters is to inspect the view definition
          using <a class="link" href="sql-statements.html#show-create-view" title="13.7.7.13 SHOW CREATE VIEW Statement"><code class="literal">SHOW CREATE VIEW</code></a>. You can
          also inspect view definitions by querying the
          <a class="link" href="information-schema.html#views-table" title="25.43 The INFORMATION_SCHEMA VIEWS Table"><code class="literal">INFORMATION_SCHEMA.VIEWS</code></a> table.
        </p></li><li class="listitem"><p>
          There must be no tables or stored procedures with individual
          <code class="literal">ENUM</code> or <code class="literal">SET</code> column
          elements that exceed 255 characters or 1020 bytes in length.
          Prior to MySQL 8.0, the maximum combined length
          of <code class="literal">ENUM</code> or <code class="literal">SET</code> column
          elements was 64K. In MySQL 8.0, the maximum
          character length of an individual <code class="literal">ENUM</code> or
          <code class="literal">SET</code> column element is 255 characters, and
          the maximum byte length is 1020 bytes. (The 1020 byte limit
          supports multitibyte character sets). Before upgrading to
          MySQL 8.0, modify any <code class="literal">ENUM</code> or
          <code class="literal">SET</code> column elements that exceed the new
          limits. Failing to do so causes the upgrade to fail with an
          error.
        </p></li><li class="listitem"><p>
          Before upgrading to MySQL 8.0.13 or higher, there must be no
          table partitions that reside in shared
          <code class="literal">InnoDB</code> tablespaces, which include the
          system tablespace and general tablespaces. Identify table
          partitions in shared tablespaces by querying
          <code class="literal">INFORMATION_SCHEMA</code>:
        </p><p>
          If upgrading from MySQL 5.7, run this query:
        </p><pre data-lang="sql" class="programlisting">SELECT DISTINCT NAME, SPACE, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES 
  WHERE NAME LIKE '%#P#%' AND SPACE_TYPE NOT LIKE 'Single';</pre><p>
          If upgrading from an earlier MySQL 8.0 release, run this
          query:
        </p><pre data-lang="sql" class="programlisting">SELECT DISTINCT NAME, SPACE, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_TABLES 
  WHERE NAME LIKE '%#P#%' AND SPACE_TYPE NOT LIKE 'Single';</pre><p>
          Move table partitions from shared tablespaces to
          file-per-table tablespaces using
          <a class="link" href="sql-statements.html#alter-table" title="13.1.9 ALTER TABLE Statement"><code class="literal">ALTER TABLE ...
          REORGANIZE PARTITION</code></a>:
        </p><pre data-lang="sql" class="programlisting">ALTER TABLE <em class="replaceable"><code>table_name</code></em> REORGANIZE PARTITION <em class="replaceable"><code>partition_name</code></em> 
  INTO (<em class="replaceable"><code>partition_definition</code></em> TABLESPACE=innodb_file_per_table);
</pre></li><li class="listitem"><p>
          There must be no queries and stored program definitions from
          MySQL 8.0.12 or lower that use <code class="literal">ASC</code> or
          <code class="literal">DESC</code> qualifiers for <code class="literal">GROUP
          BY</code> clauses. Otherwise, upgrading to MySQL 8.0.13 or
          higher may fail, as may replicating to MySQL 8.0.13 or higher
          slave servers. For additional details, see
          <a class="xref" href="installing.html#upgrade-sql-changes" title="SQL Changes">SQL Changes</a>.
        </p></li><li class="listitem"><p>
          Your MySQL 5.7 installation must not use
          features that are not supported by MySQL 8.0. Any
          changes here are necessarily installation specific, but the
          following example illustrates the kind of thing to look for:
        </p><p>
          Some server startup options and system variables have been
          removed in MySQL 8.0. See
          <a class="xref" href="introduction.html#mysql-nutshell-removals" title="Features Removed in MySQL 8.0">Features Removed in MySQL 8.0</a>, and
          <a class="xref" href="introduction.html#added-deprecated-removed" title="1.5 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.0">Section 1.5, “Server and Status Variables and Options Added, Deprecated, or Removed in
    MySQL 8.0”</a>. If you
          use any of these, an upgrade requires configuration changes.
        </p><p>
          Example: Because the data dictionary provides information
          about database objects, the server no longer checks directory
          names in the data directory to find databases. Consequently,
          the <code class="option">--ignore-db-dir</code> option is extraneous and
          has been removed. To handle this, remove any instances of
          <code class="option">--ignore-db-dir</code> from your startup
          configuration. In addition, remove or move the named data
          directory subdirectories before upgrading to MySQL
          8.0. (Alternatively, let the 8.0
          server add those directories to the data dictionary as
          databases, then remove each of those databases using
          <a class="link" href="sql-statements.html#drop-database" title="13.1.24 DROP DATABASE Statement"><code class="literal">DROP DATABASE</code></a>.)
        </p></li><li class="listitem"><p>
          If you intend to change the
          <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
          setting to 1 at upgrade time, ensure that schema and table
          names are lowercase before upgrading. Otherwise, a failure
          could occur due to a schema or table name lettercase mismatch.
          You can use the following queries to check for schema and
          table names containing uppercase characters:
        </p><pre data-lang="sql" class="programlisting">mysql&gt; SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME != LOWER(TABLE_NAME) AND TABLE_TYPE = 'BASE TABLE';
mysql&gt; SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME != LOWER(SCHEMA_NAME);          
        </pre><p>
          As of MySQL 8.0.19, if
          <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names=1</code></a>,
          table and schema names are checked by the upgrade process to
          ensure that all characters are lowercase. If table or schema
          names are found to contain uppercase characters, the upgrade
          process fails with an error.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            Changing the
            <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
            setting at upgrade time is not recommended.
</p>
</div>
</li></ol>
</div>
<p>
      If upgrade to MySQL 8.0 fails due to any of the
      issues outlined above, the server reverts all changes to the data
      directory. In this case, remove all redo log files and restart the
      MySQL 5.7 server on the existing data directory to
      address the errors. The redo log files
      (<code class="filename">ib_logfile*</code>) reside in the MySQL data
      directory by default. After the errors are fixed, perform a slow
      shutdown (by setting
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_fast_shutdown"><code class="literal">innodb_fast_shutdown=0</code></a>) before
      attempting the upgrade again.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrade-binary-package"></a>2.11.6 Upgrading MySQL Binary or Package-based Installations on Unix/Linux</h3>

</div>

</div>

</div>
<p>
      This section describes how to upgrade MySQL binary and
      package-based installations on Unix/Linux. In-place and logical
      upgrade methods are described.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#upgrade-procedure-inplace" title="In-Place Upgrade">In-Place Upgrade</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrade-procedure-logical" title="Logical Upgrade">Logical Upgrade</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#upgrading-cluster" title="MySQL Cluster Upgrade">MySQL Cluster Upgrade</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="upgrade-procedure-inplace"></a>In-Place Upgrade</h4>

</div>

</div>

</div>
<p>
        An in-place upgrade involves shutting down the old MySQL server,
        replacing the old MySQL binaries or packages with the new ones,
        restarting MySQL on the existing data directory, and upgrading
        any remaining parts of the existing installation that require
        upgrading. For details about what may need upgrading, see
        <a class="xref" href="installing.html#upgrading-what-is-upgraded" title="2.11.3 What the MySQL Upgrade Process Upgrades">Section 2.11.3, “What the MySQL Upgrade Process Upgrades”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          If you are upgrading an installation originally produced by
          installing multiple RPM packages, upgrade all the packages,
          not just some. For example, if you previously installed the
          server and client RPMs, do not upgrade just the server RPM.
        </p><p>
          For some Linux platforms, MySQL installation from RPM or
          Debian packages includes systemd support for managing MySQL
          server startup and shutdown. On these platforms,
          <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> is not installed. In such
          cases, use systemd for server startup and shutdown instead of
          the methods used in the following instructions. See
          <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a>.
        </p><p>
          For upgrades to MySQL Cluster installations, see also
          <a class="xref" href="installing.html#upgrading-cluster" title="MySQL Cluster Upgrade">MySQL Cluster Upgrade</a>.
</p>
</div>
<p>
        To perform an in-place upgrade:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Review the information in
            <a class="xref" href="installing.html#upgrade-before-you-begin" title="2.11.1 Before You Begin">Section 2.11.1, “Before You Begin”</a>.
          </p></li><li class="listitem"><p>
            Ensure the upgrade readiness of your installation by
            completing the preliminary checks in
            <a class="xref" href="installing.html#upgrade-prerequisites" title="2.11.5 Preparing Your Installation for Upgrade">Section 2.11.5, “Preparing Your Installation for Upgrade”</a>.
          </p></li><li class="listitem"><p>
            If you use XA transactions with <code class="literal">InnoDB</code>,
            run <a class="link" href="sql-statements.html#xa-statements" title="13.3.8.1 XA Transaction SQL Statements"><code class="literal">XA
            RECOVER</code></a> before upgrading to check for uncommitted
            XA transactions. If results are returned, either commit or
            rollback the XA transactions by issuing an
            <a class="link" href="sql-statements.html#xa-statements" title="13.3.8.1 XA Transaction SQL Statements"><code class="literal">XA
            COMMIT</code></a> or
            <a class="link" href="sql-statements.html#xa-statements" title="13.3.8.1 XA Transaction SQL Statements"><code class="literal">XA
            ROLLBACK</code></a> statement.
          </p></li><li class="listitem"><p>
            If there are encrypted <code class="literal">InnoDB</code>
            tablespaces, rotate the keyring master key by executing this
            statement:
          </p><pre data-lang="sql" class="programlisting">ALTER INSTANCE ROTATE INNODB MASTER KEY;</pre></li><li class="listitem"><p>
            If you normally run your MySQL server configured with
            <a class="link" href="innodb-storage-engine.html#sysvar_innodb_fast_shutdown"><code class="literal">innodb_fast_shutdown</code></a> set to
            <code class="literal">2</code> (cold shutdown), configure it to
            perform a fast or slow shutdown by executing either of these
            statements:
          </p><pre data-lang="sql" class="programlisting">SET GLOBAL innodb_fast_shutdown = 1; -- fast shutdown
SET GLOBAL innodb_fast_shutdown = 0; -- slow shutdown</pre><p>
            With a fast or slow shutdown, <code class="literal">InnoDB</code>
            leaves its undo logs and data files in a state that can be
            dealt with in case of file format differences between
            releases.
          </p></li><li class="listitem"><p>
            Shut down the old MySQL server. For example:
          </p><pre data-lang="terminal" class="programlisting">mysqladmin -u root -p shutdown</pre></li><li class="listitem"><p>
            Upgrade the MySQL binaries or packages. If upgrading a
            binary installation, unpack the new MySQL binary
            distribution package. See
            <a class="xref" href="installing.html#binary-installation-unpack" title="Obtain and Unpack the Distribution">Obtain and Unpack the Distribution</a>. For
            package-based installations, install the new packages.
          </p></li><li class="listitem"><p>
            Start the MySQL 8.0 server, using the existing
            data directory. For example:
          </p><pre data-lang="terminal" class="programlisting">mysqld_safe --user=mysql --datadir=<em class="replaceable"><code>/path/to/existing-datadir</code></em> &amp;
</pre><p>
            If there are encrypted <code class="literal">InnoDB</code>
            tablespaces, use the
            <a class="link" href="server-administration.html#option_mysqld_early-plugin-load"><code class="option">--early-plugin-load</code></a> option to
            load the keyring plugin.
          </p><p>
            When you start the MySQL 8.0 server, it
            automatically detects whether data dictionary tables are
            present. If not, the server creates them in the data
            directory, populates them with metadata, and then proceeds
            with its normal startup sequence. During this process, the
            server upgrades metadata for all database objects, including
            databases, tablespaces, system and user tables, views, and
            stored programs (stored procedures and functions, triggers,
            and Event Scheduler events). The server also removes files
            that previously were used for metadata storage. For example,
            after upgrading from MySQL 5.7 to MySQL
            8.0, you will notice that tables no longer have
            <code class="filename">.frm</code> files.
          </p><p>
            If this step fails, the server reverts all changes to the
            data directory. In this case, you should remove all redo log
            files, start your MySQL 5.7 server on the same
            data directory, and fix the cause of any errors. Then
            perform another slow shutdown of the 5.7
            server and start the MySQL 8.0 server to try
            again.
          </p></li><li class="listitem"><p>
            In the previous step, the server upgrades the data
            dictionary as necessary. Now it is necessary to perform any
            remaining upgrade operations:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                As of MySQL 8.0.16, the server will already have done so
                in the previous step: It makes any changes required in
                the <code class="literal">mysql</code> system schema between MySQL
                5.7 and MySQL 8.0, so that
                you can take advantage of new privileges or
                capabilities. It also brings the Performance Schema,
                <code class="literal">INFORMATION_SCHEMA</code>, and
                <code class="literal">sys</code> schema up to date for MySQL
                8.0, and examines all user schemas for
                incompatibilities with the current version of MySQL.
              </p></li><li class="listitem"><p>
                Prior to MySQL 8.0.16, the server upgrades only the data
                dictionary in the previous step. After the MySQL
                8.0 server starts successfully, execute
                <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> to perform the
                remaining upgrade tasks:
              </p><pre data-lang="terminal" class="programlisting">mysql_upgrade -u root -p</pre><p>
                Then shut down and restart the MySQL server to ensure
                that any changes made to the system tables take effect.
                For example:
              </p><pre data-lang="terminal" class="programlisting">mysqladmin -u root -p shutdown
mysqld_safe --user=mysql --datadir=<em class="replaceable"><code>/path/to/existing-datadir</code></em> &amp;
</pre><p>
                The first time you start the MySQL 8.0
                server (in an earlier step), you may notice messages in
                the error log regarding nonupgraded tables. If
                <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> has been run
                successfully, there should be no such messages the
                second time you start the server.
</p></li></ul>
</div>
</li></ol>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          The upgrade process does not upgrade the contents of the time
          zone tables. For upgrade instructions, see
          <a class="xref" href="server-administration.html#time-zone-support" title="5.1.14 MySQL Server Time Zone Support">Section 5.1.14, “MySQL Server Time Zone Support”</a>.
        </p><p>
          If the upgrade process uses <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
          (that is, prior to MySQL 8.0.16), the process does not upgrade
          the contents of the help tables, either. For upgrade
          instructions in that case, see
          <a class="xref" href="server-administration.html#server-side-help-support" title="5.1.16 Server-Side Help Support">Section 5.1.16, “Server-Side Help Support”</a>.
</p>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrade-procedure-logical"></a>Logical Upgrade</h4>

</div>

</div>

</div>
<p>
        A logical upgrade involves exporting SQL from the old MySQL
        instance using a backup or export utility such as
        <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> or <a class="link" href="programs.html#mysqlpump" title="4.5.6 mysqlpump — A Database Backup Program"><span class="command"><strong>mysqlpump</strong></span></a>,
        installing the new MySQL server, and applying the SQL to your
        new MySQL instance. For details about what may need upgrading,
        see <a class="xref" href="installing.html#upgrading-what-is-upgraded" title="2.11.3 What the MySQL Upgrade Process Upgrades">Section 2.11.3, “What the MySQL Upgrade Process Upgrades”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          For some Linux platforms, MySQL installation from RPM or
          Debian packages includes systemd support for managing MySQL
          server startup and shutdown. On these platforms,
          <a class="link" href="programs.html#mysqld-safe" title="4.3.2 mysqld_safe — MySQL Server Startup Script"><span class="command"><strong>mysqld_safe</strong></span></a> is not installed. In such
          cases, use systemd for server startup and shutdown instead of
          the methods used in the following instructions. See
          <a class="xref" href="installing.html#using-systemd" title="2.5.9 Managing MySQL Server with systemd">Section 2.5.9, “Managing MySQL Server with systemd”</a>.
</p>
</div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
          Applying SQL extracted from a previous MySQL release to a new
          MySQL release may result in errors due to incompatibilities
          introduced by new, changed, deprecated, or removed features
          and capabilities. Consequently, SQL extracted from a previous
          MySQL release may require modification to enable a logical
          upgrade.
        </p><p>
          To identify incompatibilities before upgrading to the latest
          MySQL 8.0 release, perform the steps described in
          <a class="xref" href="installing.html#upgrade-prerequisites" title="2.11.5 Preparing Your Installation for Upgrade">Section 2.11.5, “Preparing Your Installation for Upgrade”</a>.
</p>
</div>
<p>
        To perform a logical upgrade:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Review the information in
            <a class="xref" href="installing.html#upgrade-before-you-begin" title="2.11.1 Before You Begin">Section 2.11.1, “Before You Begin”</a>.
          </p></li><li class="listitem"><p>
            Export your existing data from the previous MySQL
            installation:
          </p><pre data-lang="terminal" class="programlisting">mysqldump -u root -p
  --add-drop-table --routines --events
--all-databases --force &gt; data-for-upgrade.sql</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              Use the <a class="link" href="programs.html#option_mysqldump_routines"><code class="option">--routines</code></a> and
              <a class="link" href="programs.html#option_mysqldump_events"><code class="option">--events</code></a> options with
              <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> (as shown above) if your
              databases include stored programs. The
              <a class="link" href="programs.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option
              includes all databases in the dump, including the
              <code class="literal">mysql</code> database that holds the system
              tables.
</p>
</div>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
              If you have tables that contain generated columns, use the
              <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> utility provided with MySQL
              5.7.9 or higher to create your dump files. The
              <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> utility provided in earlier
              releases uses incorrect syntax for generated column
              definitions (Bug #20769542). You can use the
              <a class="link" href="information-schema.html#columns-table" title="25.8 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">INFORMATION_SCHEMA.COLUMNS</code></a>
              table to identify tables with generated columns.
</p>
</div>
</li><li class="listitem"><p>
            Shut down the old MySQL server. For example:
          </p><pre data-lang="terminal" class="programlisting">mysqladmin -u root -p shutdown</pre></li><li class="listitem"><p>
            Install MySQL 8.0. For installation
            instructions, see <a class="xref" href="installing.html" title="Chapter 2 Installing and Upgrading MySQL">Chapter 2, <i>Installing and Upgrading MySQL</i></a>.
          </p></li><li class="listitem"><p>
            Initialize a new data directory, as described in
            <a class="xref" href="installing.html#data-directory-initialization" title="2.10.1 Initializing the Data Directory">Section 2.10.1, “Initializing the Data Directory”</a>. For
            example:
          </p><pre data-lang="terminal" class="programlisting">mysqld --initialize --datadir=<em class="replaceable"><code>/path/to/8.0-datadir</code></em>
</pre><p>
            Copy the temporary <code class="literal">'root'@'localhost'</code>
            password displayed to your screen or written to your error
            log for later use.
          </p></li><li class="listitem"><p>
            Start the MySQL 8.0 server, using the new data
            directory. For example:
          </p><pre data-lang="terminal" class="programlisting">mysqld_safe --user=mysql --datadir=<em class="replaceable"><code>/path/to/8.0-datadir</code></em> &amp;
</pre></li><li class="listitem"><p>
            Reset the <code class="literal">root</code> password:
          </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>mysql -u root -p</code></strong>
Enter password: <strong class="userinput"><code>****</code></strong>  &lt;- enter temporary root password
</pre><pre data-lang="sql" class="programlisting">mysql&gt; <strong class="userinput"><code>ALTER USER USER() IDENTIFIED BY '<em class="replaceable"><code>your new password</code></em>';</code></strong>
</pre></li><li class="listitem"><p>
            Load the previously created dump file into the new MySQL
            server. For example:
</p><pre data-lang="terminal" class="programlisting">mysql -u root -p --force &lt; data-for-upgrade.sql</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              It is not recommended to load a dump file when GTIDs are
              enabled on the server
              (<a class="link" href="replication.html#sysvar_gtid_mode"><code class="literal">gtid_mode=ON</code></a>), if your
              dump file includes system tables.
              <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> issues DML instructions for
              the system tables which use the non-transactional MyISAM
              storage engine, and this combination is not permitted when
              GTIDs are enabled. Also be aware that loading a dump file
              from a server with GTIDs enabled, into another server with
              GTIDs enabled, causes different transaction identifiers to
              be generated.
</p>
</div>
</li><li class="listitem"><p>
            Perform any remaining upgrade operations:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
                In MySQL 8.0.16 and higher, shut down the server, then
                restart it with the
                <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=FORCE</code></a> option to
                perform the remaining upgrade tasks:
              </p><pre data-lang="terminal" class="programlisting">mysqladmin -u root -p shutdown
mysqld_safe --user=mysql --datadir=<em class="replaceable"><code>/path/to/8.0-datadir</code></em> --upgrade=FORCE &amp;
</pre><p>
                Upon restart with
                <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=FORCE</code></a>, the
                server makes any changes required in the
                <code class="literal">mysql</code> system schema between MySQL
                5.7 and MySQL 8.0, so that
                you can take advantage of new privileges or
                capabilities. It also brings the Performance Schema,
                <code class="literal">INFORMATION_SCHEMA</code>, and
                <code class="literal">sys</code> schema up to date for MySQL
                8.0, and examines all user schemas for
                incompatibilities with the current version of MySQL.
              </p></li><li class="listitem"><p>
                Prior to MySQL 8.0.16, execute
                <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> to perform the
                remaining upgrade tasks:
              </p><pre data-lang="terminal" class="programlisting">mysql_upgrade -u root -p</pre><p>
                Then shut down and restart the MySQL server to ensure
                that any changes made to the system tables take effect.
                For example:
              </p><pre data-lang="terminal" class="programlisting">mysqladmin -u root -p shutdown
mysqld_safe --user=mysql --datadir=<em class="replaceable"><code>/path/to/8.0-datadir</code></em> &amp;
</pre></li></ul>
</div>
</li></ol>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          The upgrade process does not upgrade the contents of the time
          zone tables. For upgrade instructions, see
          <a class="xref" href="server-administration.html#time-zone-support" title="5.1.14 MySQL Server Time Zone Support">Section 5.1.14, “MySQL Server Time Zone Support”</a>.
        </p><p>
          If the upgrade process uses <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
          (that is, prior to MySQL 8.0.16), the process does not upgrade
          the contents of the help tables, either. For upgrade
          instructions in that case, see
          <a class="xref" href="server-administration.html#server-side-help-support" title="5.1.16 Server-Side Help Support">Section 5.1.16, “Server-Side Help Support”</a>.
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          Loading a dump file that contains a MySQL 5.7
          <code class="literal">mysql</code> schema re-creates two tables that are
          no longer used: <code class="literal">event</code> and
          <code class="literal">proc</code>. (The corresponding MySQL 8.0 tables
          are <code class="literal">events</code> and <code class="literal">routines</code>,
          both of which are data dictionary tables and are protected.)
          After you are satisfied that the upgrade was successful, you
          can remove the <code class="literal">event</code> and
          <code class="literal">proc</code> tables by executing these SQL
          statements:
        </p><pre data-lang="sql" class="programlisting">DROP TABLE mysql.event;
DROP TABLE mysql.proc;</pre>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="upgrading-cluster"></a>MySQL Cluster Upgrade</h4>

</div>

</div>

</div>
<p>
        The information in this section is an adjunct to the in-place
        upgrade procedure described in
        <a class="xref" href="installing.html#upgrade-procedure-inplace" title="In-Place Upgrade">In-Place Upgrade</a>, for use if you are
        upgrading MySQL Cluster.
      </p><p>
        As of MySQL 8.0.16, a MySQL Cluster upgrade can be performed as
        a regular rolling upgrade, following the usual three ordered
        steps:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Upgrade MGM nodes.
          </p></li><li class="listitem"><p>
            Upgrade data nodes one at a time.
          </p></li><li class="listitem"><p>
            Upgrade API nodes one at a time (including MySQL servers).
</p></li></ol>
</div>
<p>
        The way to upgrade each of the nodes remains almost the same as
        prior to MySQL 8.0.16 because there is a separation between
        upgrading the data dictionary and upgrading the system tables.
        There are two steps to upgrading each individual
        <code class="literal">mysqld</code>:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Import the data dictionary.
          </p><p>
            Start the new server with the
            <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a> option to
            upgrade the data dictionary but not the system tables. This
            is essentially the same as the pre-MySQL 8.0.16 action of
            starting the server and not invoking
            <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>.
          </p><p>
            The MySQL server must be connected to <code class="literal">NDB</code>
            for this phase to complete. If any <code class="literal">NDB</code> or
            <code class="literal">NDBINFO</code> tables exist, and the server
            cannot connect to the cluster, it exits with an error
            message:
          </p><pre data-lang="none" class="programlisting">Failed to Populate DD tables.</pre></li><li class="listitem"><p>
            Upgrade the system tables.
          </p><p>
            Prior to MySQL 8.0.16, the DBA invokes the
            <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> client to upgrade the
            system tables. As of MySQL 8.0.16, the server performs this
            action: To upgrade the system tables, restart each
            individual <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> without the
            <a class="link" href="server-administration.html#option_mysqld_upgrade"><code class="option">--upgrade=MINIMAL</code></a> option.
</p></li></ol>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="updating-yum-repo"></a>2.11.7 Upgrading MySQL with the MySQL Yum Repository</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436467424"></a><a class="indexterm" name="idm46444436466384"></a><p>
      For supported Yum-based platforms (see
      <a class="xref" href="installing.html#linux-installation-yum-repo" title="2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository">Section 2.5.1, “Installing MySQL on Linux Using the MySQL Yum Repository”</a>, for a list), you
      can perform an in-place upgrade for MySQL (that is, replacing the
      old version and then running the new version using the old data
      files) with the MySQL Yum repository.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Notes
</div>

<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Before performing any update to MySQL, follow carefully the
            instructions in <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a>. Among other
            instructions discussed there, it is especially important to
            back up your database before the update.
          </p></li><li class="listitem"><p>
            The following instructions assume you have installed MySQL
            with the MySQL Yum repository or with an RPM package
            directly downloaded from
            <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">MySQL Developer Zone's
            MySQL Download page</a>; if that is not the case,
            following the instructions in
            <a class="ulink" href="https://dev.mysql.com/doc/refman/5.7/en/replace-third-party-yum.html" target="_top">Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository</a>.
</p></li></ul>
</div>

</div>
<p>
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem">
<h4><a name="idm46444436456192"></a>Selecting a Target Series</h4>
<p>
            By default, the MySQL Yum repository updates MySQL to the
            latest version in the release series you have chosen during
            installation (see <a class="xref" href="installing.html#yum-repo-select-series" title="Selecting a Release Series">Selecting a Release Series</a>
            for details), which means, for example, a
            5.7.x installation will
            <span class="emphasis"><em>not</em></span> be updated to a 8.0.x
            release automatically. To update to another release series,
            you need to first disable the subrepository for the series
            that has been selected (by default, or by yourself) and
            enable the subrepository for your target series. To do that,
            see the general instructions given in
            <a class="xref" href="installing.html#yum-repo-select-series" title="Selecting a Release Series">Selecting a Release Series</a>. For upgrading from
            MySQL 5.7 to 8.0, perform the
            <span class="emphasis"><em>reverse</em></span> of the steps illustrated in
            <a class="xref" href="installing.html#yum-repo-select-series" title="Selecting a Release Series">Selecting a Release Series</a>, disabling the
            subrepository for the MySQL 5.7 series and
            enabling that for the MySQL 8.0 series.
          </p><p>
            As a general rule, to upgrade from one release series to
            another, go to the next series rather than skipping a
            series. For example, if you are currently running MySQL 5.6
            and wish to upgrade to 8.0, upgrade to MySQL
            5.7 first before upgrading to
            8.0.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
              For important information about upgrading from MySQL
              5.7 to 8.0, see
              <a class="link" href="installing.html#upgrading-from-previous-series" title="2.11.4 Changes in MySQL 8.0">Upgrading
              from MySQL 5.7 to 8.0</a>.
</p>
</div>
</li><li class="listitem">
<h4><a name="idm46444436448352"></a>Upgrading MySQL</h4>
<p>
            Upgrade MySQL and its components by the following command,
            for platforms that are not dnf-enabled:
          </p><pre data-lang="terminal" class="programlisting">sudo yum update mysql-server</pre><p>
            For platforms that are dnf-enabled:
          </p><pre data-lang="terminal" class="programlisting">sudo dnf upgrade mysql-server</pre><p>
            Alternatively, you can update MySQL by telling Yum to update
            everything on your system, which might take considerably
            more time. For platforms that are not dnf-enabled:
          </p><pre data-lang="terminal" class="programlisting">sudo yum update</pre><p>
            For platforms that are dnf-enabled:
</p><pre data-lang="terminal" class="programlisting">sudo dnf upgrade</pre></li><li class="listitem">
<h4><a name="idm46444436441376"></a>Restarting MySQL</h4>
<p>
            The MySQL server always restarts after an update by Yum.
            Prior to MySQL 8.0.16, run <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
            after the server restarts to check and possibly resolve any
            incompatibilities between the old data and the upgraded
            software. <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a> also performs
            other functions; for details, see
            <a class="xref" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables">Section 4.4.5, “<span class="command"><strong>mysql_upgrade</strong></span> — Check and Upgrade MySQL Tables”</a>. As of MySQL 8.0.16, this
            step is not required, as the server performs all tasks
            previously handled by <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>.
</p></li></ol>
</div>
<p>
    </p><p>
      You can also update only a specific component. Use the following
      command to list all the installed packages for the MySQL
      components (for dnf-enabled systems, replace
      <span class="command"><strong>yum</strong></span> in the command with
      <span class="command"><strong>dnf</strong></span>):
    </p><pre data-lang="terminal" class="programlisting">sudo yum list installed | grep "^mysql"</pre><p>
      After identifying the package name of the component of your
      choice, update the package with the following command, replacing
      <em class="replaceable"><code>package-name</code></em> with the name of the
      package. For platforms that are not dnf-enabled:
    </p><pre data-lang="terminal" class="programlisting">sudo yum update <em class="replaceable"><code>package-name</code></em>
</pre><p>
      For dnf-enabled platforms:
    </p><pre data-lang="terminal" class="programlisting">sudo dnf upgrade <em class="replaceable"><code>package-name</code></em>
</pre>
<h4><a name="updating-yum-repo-client-lib"></a>Upgrading the Shared Client Libraries</h4>
<p>
      After updating MySQL using the Yum repository, applications
      compiled with older versions of the shared client libraries should
      continue to work.
    </p><p>
      <span class="emphasis"><em>If you recompile applications and dynamically link them
      with the updated libraries: </em></span> As typical with new
      versions of shared libraries where there are differences or
      additions in symbol versioning between the newer and older
      libraries (for example, between the newer, standard
      8.0 shared client libraries and some
      older—prior or variant—versions of the shared
      libraries shipped natively by the Linux distributions' software
      repositories, or from some other sources), any applications
      compiled using the updated, newer shared libraries will require
      those updated libraries on systems where the applications are
      deployed. And, as expected, if those libraries are not in place,
      the applications requiring the shared libraries will fail. So, be
      sure to deploy the packages for the shared libraries from MySQL on
      those systems. To do this, add the MySQL Yum repository to the
      systems (see <a class="xref" href="installing.html#yum-repo-setup" title="Adding the MySQL Yum Repository">Adding the MySQL Yum Repository</a>) and install the
      latest shared libraries using the instructions given in
      <a class="xref" href="installing.html#yum-install-components" title="Installing Additional MySQL Products and Components with Yum">Installing Additional MySQL Products and Components with Yum</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="updating-apt-repo"></a>2.11.8 Upgrading MySQL with the MySQL APT Repository</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436421344"></a><a class="indexterm" name="idm46444436420304"></a><p>
      On Debian and Ubuntu platforms, to perform an in-place upgrade of
      MySQL and its components, use the MySQL APT repository. See
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/index.html#repo-qg-apt-upgrading" target="_top">Upgrading
      MySQL with the MySQL APT Repository</a> in
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/" target="_top">A Quick
      Guide to Using the MySQL APT Repository</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="updating-sles-repo"></a>2.11.9 Upgrading MySQL with the MySQL SLES Repository</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436415328"></a><a class="indexterm" name="idm46444436414288"></a><p>
      On the SUSE Linux Enterprise Server (SLES) platform, to perform an
      in-place upgrade of MySQL and its components, use the MySQL SLES
      repository. See
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-sles-repo-quick-guide/en/index.html#repo-qg-sles-upgrading" target="_top">Upgrading
      MySQL with the MySQL SLES Repository</a> in
      <a class="ulink" href="https://dev.mysql.com/doc/mysql-sles-repo-quick-guide/en/" target="_top">A
      Quick Guide to Using the MySQL SLES Repository</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="windows-upgrading"></a>2.11.10 Upgrading MySQL on Windows</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436409296"></a><p>
      There are two approaches for upgrading MySQL on Windows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <a class="link" href="installing.html#windows-upgrading-installer" title="Upgrading MySQL with MySQL Installer">Using MySQL Installer</a>
        </p></li><li class="listitem"><p>
          <a class="link" href="installing.html#windows-upgrading-zip-distribution" title="Upgrading MySQL Using the Windows ZIP Distribution">Using the
          Windows ZIP archive distribution</a>
</p></li></ul>
</div>
<p>
      The approach you select depends on how the existing installation
      was performed. Before proceeding, review
      <a class="xref" href="installing.html#upgrading" title="2.11 Upgrading MySQL">Section 2.11, “Upgrading MySQL”</a> for additional information on
      upgrading MySQL that is not specific to Windows.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        Whichever approach you choose, always back up your current MySQL
        installation before performing an upgrade. See
        <a class="xref" href="backup-and-recovery.html#backup-methods" title="7.2 Database Backup Methods">Section 7.2, “Database Backup Methods”</a>.
</p>
</div>
<p>
      Upgrades between non-GA releases (or from a non-GA release to a GA
      release) are not supported. Significant development changes take
      place in non-GA releases and you may encounter compatibility
      issues or problems starting the server.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        MySQL Installer does not support upgrades between
        <span class="emphasis"><em>Community</em></span> releases and
        <span class="emphasis"><em>Commercial</em></span> releases. If you require this
        type of upgrade, perform it using the
        <a class="link" href="installing.html#windows-upgrading-zip-distribution" title="Upgrading MySQL Using the Windows ZIP Distribution">ZIP
        archive</a> approach.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="windows-upgrading-installer"></a>Upgrading MySQL with MySQL Installer</h4>

</div>

</div>

</div>
<p>
        Performing an upgrade with MySQL Installer is the best approach when the
        current server installation was performed with it and the
        upgrade is within the current release series. MySQL Installer does not
        support upgrades between release series, such as from
        5.7 to 8.0, and it does not provide
        an upgrade indicator to prompt you to upgrade. For instructions
        on upgrading between release series, see
        <a class="xref" href="installing.html#windows-upgrading-zip-distribution" title="Upgrading MySQL Using the Windows ZIP Distribution">Upgrading MySQL Using the Windows ZIP Distribution</a>.
      </p><p>
        To perform an upgrade using MySQL Installer:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Start MySQL Installer.
          </p></li><li class="listitem"><p>
            From the dashboard, click <span class="guilabel">Catalog</span> to
            download the latest changes to the catalog. The installed
            server can be upgraded only if the dashboard displays an
            arrow next to the version number of the server.
          </p></li><li class="listitem"><p>
            Click <span class="guilabel">Upgrade</span>. All products that have a
            newer version now appear in a list.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              MySQL Installer deselects the server upgrade option for milestone
              releases (Pre-Release) in the same release series. In
              addition, it displays a warning to indicate that the
              upgrade is not supported, identifies the risks of
              continuing, and provides a summary of the steps to perform
              an upgrade manually. You can reselect server upgrade and
              proceed at your own risk.
</p>
</div>
</li><li class="listitem"><p>
            Deselect all but the MySQL server product, unless you intend
            to upgrade other products at this time, and click
            <span class="guibutton">Next</span>.
          </p></li><li class="listitem"><p>
            Click <span class="guibutton">Execute</span> to start the download.
            When the download finishes, click
            <span class="guibutton">Next</span> to begin the upgrade operation.
          </p><p>
            Upgrades to MySQL 8.0.16 and higher may show an option to
            skip the upgrade check and process for system tables. For
            more information about this option, see
            <a class="link" href="installing.html#mysql-installer-alter-upgrade">Important
            server upgrade conditions</a>.
          </p></li><li class="listitem"><p>
            Configure the server.
</p></li></ol>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="windows-upgrading-zip-distribution"></a>Upgrading MySQL Using the Windows ZIP Distribution</h4>

</div>

</div>

</div>
<p>
        To perform an upgrade using the Windows ZIP archive
        distribution:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            Download the latest Windows ZIP Archive distribution of
            MySQL from <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">https://dev.mysql.com/downloads/</a>.
          </p></li><li class="listitem"><p>
            If the server is running, stop it. If the server is
            installed as a service, stop the service with the following
            command from the command prompt:
          </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>SC STOP <em class="replaceable"><code>mysqld_service_name</code></em></code></strong>
</pre><p>
            Alternatively, use <span class="command"><strong>NET STOP
            <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>.
          </p><p>
            If you are not running the MySQL server as a service, use
            <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> to stop it. For example,
            before upgrading from MySQL 5.7 to
            8.0, use <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> from
            MySQL 5.7 as follows:
          </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqladmin" -u root shutdown</code></strong>
</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              If the MySQL <code class="literal">root</code> user account has a
              password, invoke <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin</strong></span></a> with the
              <code class="option">-p</code> option and enter the password when
              prompted.
</p>
</div>
</li><li class="listitem"><p>
            Extract the ZIP archive. You may either overwrite your
            existing MySQL installation (usually located at
            <code class="filename">C:\mysql</code>), or install it into a
            different directory, such as <code class="literal">C:\mysql8</code>.
            Overwriting the existing installation is recommended.
          </p></li><li class="listitem"><p>
            Restart the server. For example, use the <span class="command"><strong>SC START
            <em class="replaceable"><code>mysqld_service_name</code></em></strong></span> or
            <span class="command"><strong>NET START
            <em class="replaceable"><code>mysqld_service_name</code></em></strong></span>
            command if you run MySQL as a service, or invoke
            <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> directly otherwise.
          </p></li><li class="listitem"><p>
            Prior to MySQL 8.0.16, run <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>
            as Administrator to check your tables, attempt to repair
            them if necessary, and update your grant tables if they have
            changed so that you can take advantage of any new
            capabilities. See <a class="xref" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables">Section 4.4.5, “<span class="command"><strong>mysql_upgrade</strong></span> — Check and Upgrade MySQL Tables”</a>. As of
            MySQL 8.0.16, this step is not required, as the server
            performs all tasks previously handled by
            <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>.
          </p></li><li class="listitem"><p>
            If you encounter errors, see
            <a class="xref" href="installing.html#windows-troubleshooting" title="2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation">Section 2.3.5, “Troubleshooting a Microsoft Windows MySQL Server Installation”</a>.
</p></li></ol>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrade-docker-mysql"></a>2.11.11 Upgrading a Docker Installation of MySQL</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436350928"></a><a class="indexterm" name="idm46444436349888"></a><p>
      To upgrade a Docker installation of MySQL, refer to
      <a class="xref" href="installing.html#docker-upgrading" title="Upgrading a MySQL Server Container">Upgrading a MySQL Server Container</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="upgrade-troubleshooting"></a>2.11.12 Upgrade Troubleshooting</h3>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          A schema mismatch in a MySQL 5.7 instance
          between the <code class="filename">.frm</code> file of a table and the
          <code class="literal">InnoDB</code> data dictionary can cause an upgrade
          to MySQL 8.0 to fail. Such mismatches may be due
          to <code class="filename">.frm</code> file corruption. To address this
          issue, dump and restore affected tables before attempting the
          upgrade again.
        </p></li><li class="listitem"><p>
          If problems occur, such as that the new
          <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server does not start, verify that
          you do not have an old <code class="filename">my.cnf</code> file from
          your previous installation. You can check this with the
          <a class="link" href="programs.html#option_general_print-defaults"><code class="option">--print-defaults</code></a> option (for
          example, <a class="link" href="programs.html#mysqld" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld --print-defaults</strong></span></a>). If this
          command displays anything other than the program name, you
          have an active <code class="filename">my.cnf</code> file that affects
          server or client operation.
        </p></li><li class="listitem"><p>
          If, after an upgrade, you experience problems with compiled
          client programs, such as <code class="literal">Commands out of
          sync</code> or unexpected core dumps, you probably have
          used old header or library files when compiling your programs.
          In this case, check the date for your
          <code class="filename">mysql.h</code> file and
          <code class="filename">libmysqlclient.a</code> library to verify that
          they are from the new MySQL distribution. If not, recompile
          your programs with the new headers and libraries.
          Recompilation might also be necessary for programs compiled
          against the shared client library if the library major version
          number has changed (for example, from
          <code class="filename">libmysqlclient.so.20</code> to
          <code class="filename">libmysqlclient.so.21</code>).
        </p></li><li class="listitem"><p>
          If you have created a user-defined function (UDF) with a given
          name and upgrade MySQL to a version that implements a new
          built-in function with the same name, the UDF becomes
          inaccessible. To correct this, use <a class="link" href="sql-statements.html#drop-function" title="13.1.26 DROP FUNCTION Statement"><code class="literal">DROP
          FUNCTION</code></a> to drop the UDF, and then use
          <a class="link" href="sql-statements.html#create-function" title="13.1.14 CREATE FUNCTION Statement"><code class="literal">CREATE FUNCTION</code></a> to re-create
          the UDF with a different nonconflicting name. The same is true
          if the new version of MySQL implements a built-in function
          with the same name as an existing stored function. See
          <a class="xref" href="language-structure.html#function-resolution" title="9.2.5 Function Name Parsing and Resolution">Section 9.2.5, “Function Name Parsing and Resolution”</a>, for the rules
          describing how the server interprets references to different
          kinds of functions.
        </p></li><li class="listitem"><p>
          If upgrade to MySQL 8.0 fails due to any of the
          issues outlined in <a class="xref" href="installing.html#upgrade-prerequisites" title="2.11.5 Preparing Your Installation for Upgrade">Section 2.11.5, “Preparing Your Installation for Upgrade”</a>,
          the server reverts all changes to the data directory. In this
          case, remove all redo log files and restart the MySQL
          5.7 server on the existing data directory to
          address the errors. The redo log files
          (<code class="filename">ib_logfile*</code>) reside in the MySQL data
          directory by default. After the errors are fixed, perform a
          slow shutdown (by setting
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_fast_shutdown"><code class="literal">innodb_fast_shutdown=0</code></a>)
          before attempting the upgrade again.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="rebuilding-tables"></a>2.11.13 Rebuilding or Repairing Tables or Indexes</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436321168"></a><a class="indexterm" name="idm46444436319712"></a><a class="indexterm" name="idm46444436318224"></a><p>
      This section describes how to rebuild or repair tables or indexes,
      which may be necessitated by:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Changes to how MySQL handles data types or character sets. For
          example, an error in a collation might have been corrected,
          necessitating a table rebuild to update the indexes for
          character columns that use the collation.
        </p></li><li class="listitem"><p>
          Required table repairs or upgrades reported by
          <a class="link" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement"><code class="literal">CHECK TABLE</code></a>,
          <a class="link" href="programs.html#mysqlcheck" title="4.5.3 mysqlcheck — A Table Maintenance Program"><span class="command"><strong>mysqlcheck</strong></span></a>, or
          <a class="link" href="programs.html#mysql-upgrade" title="4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables"><span class="command"><strong>mysql_upgrade</strong></span></a>.
</p></li></ul>
</div>
<p>
      Methods for rebuilding a table include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="installing.html#rebuilding-tables-dump-reload" title="Dump and Reload Method">Dump and Reload Method</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#rebuilding-tables-alter-table" title="ALTER TABLE Method">ALTER TABLE Method</a></p></li><li class="listitem"><p><a class="xref" href="installing.html#rebuilding-tables-repair-table" title="REPAIR TABLE Method">REPAIR TABLE Method</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="rebuilding-tables-dump-reload"></a>Dump and Reload Method</h4>

</div>

</div>

</div>
<p>
        If you are rebuilding tables because a different version of
        MySQL will not handle them after a binary (in-place) upgrade or
        downgrade, you must use the dump-and-reload method. Dump the
        tables <span class="emphasis"><em>before</em></span> upgrading or downgrading
        using your original version of MySQL. Then reload the tables
        <span class="emphasis"><em>after</em></span> upgrading or downgrading.
      </p><p>
        If you use the dump-and-reload method of rebuilding tables only
        for the purpose of rebuilding indexes, you can perform the dump
        either before or after upgrading or downgrading. Reloading still
        must be done afterward.
      </p><p>
        If you need to rebuild an <code class="literal">InnoDB</code> table
        because a <a class="link" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement"><code class="literal">CHECK TABLE</code></a> operation
        indicates that a table upgrade is required, use
        <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to create a dump file and
        <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> to reload the file. If the
        <a class="link" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement"><code class="literal">CHECK TABLE</code></a> operation indicates
        that there is a corruption or causes <code class="literal">InnoDB</code>
        to fail, refer to <a class="xref" href="innodb-storage-engine.html#forcing-innodb-recovery" title="15.21.2 Forcing InnoDB Recovery">Section 15.21.2, “Forcing InnoDB Recovery”</a> for
        information about using the
        <a class="link" href="innodb-storage-engine.html#sysvar_innodb_force_recovery"><code class="literal">innodb_force_recovery</code></a> option to
        restart <code class="literal">InnoDB</code>. To understand the type of
        problem that <a class="link" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement"><code class="literal">CHECK TABLE</code></a> may be
        encountering, refer to the <code class="literal">InnoDB</code> notes in
        <a class="xref" href="sql-statements.html#check-table" title="13.7.3.2 CHECK TABLE Statement">Section 13.7.3.2, “CHECK TABLE Statement”</a>.
      </p><p>
        To rebuild a table by dumping and reloading it, use
        <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to create a dump file and
        <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> to reload the file:
      </p><pre data-lang="terminal" class="programlisting">mysqldump <em class="replaceable"><code>db_name</code></em> t1 &gt; dump.sql
mysql <em class="replaceable"><code>db_name</code></em> &lt; dump.sql
</pre><p>
        To rebuild all the tables in a single database, specify the
        database name without any following table name:
      </p><pre data-lang="terminal" class="programlisting">mysqldump <em class="replaceable"><code>db_name</code></em> &gt; dump.sql
mysql <em class="replaceable"><code>db_name</code></em> &lt; dump.sql
</pre><p>
        To rebuild all tables in all databases, use the
        <a class="link" href="programs.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option:
      </p><pre data-lang="terminal" class="programlisting">mysqldump --all-databases &gt; dump.sql
mysql &lt; dump.sql</pre>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="rebuilding-tables-alter-table"></a>ALTER TABLE Method</h4>

</div>

</div>

</div>
<p>
        To rebuild a table with <a class="link" href="sql-statements.html#alter-table" title="13.1.9 ALTER TABLE Statement"><code class="literal">ALTER
        TABLE</code></a>, use a <span class="quote">“<span class="quote">null</span>”</span> alteration; that is,
        an <a class="link" href="sql-statements.html#alter-table" title="13.1.9 ALTER TABLE Statement"><code class="literal">ALTER TABLE</code></a> statement that
        <span class="quote">“<span class="quote">changes</span>”</span> the table to use the storage engine that
        it already has. For example, if <code class="literal">t1</code> is an
        <code class="literal">InnoDB</code> table, use this statement:
      </p><pre data-lang="sql" class="programlisting">ALTER TABLE t1 ENGINE = InnoDB;</pre><p>
        If you are not sure which storage engine to specify in the
        <a class="link" href="sql-statements.html#alter-table" title="13.1.9 ALTER TABLE Statement"><code class="literal">ALTER TABLE</code></a> statement, use
        <a class="link" href="sql-statements.html#show-create-table" title="13.7.7.10 SHOW CREATE TABLE Statement"><code class="literal">SHOW CREATE TABLE</code></a> to display the
        table definition.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="rebuilding-tables-repair-table"></a>REPAIR TABLE Method</h4>

</div>

</div>

</div>
<p>
        The <a class="link" href="sql-statements.html#repair-table" title="13.7.3.5 REPAIR TABLE Statement"><code class="literal">REPAIR TABLE</code></a> method is only
        applicable to <code class="literal">MyISAM</code>,
        <code class="literal">ARCHIVE</code>, and <code class="literal">CSV</code> tables.
      </p><p>
        You can use <a class="link" href="sql-statements.html#repair-table" title="13.7.3.5 REPAIR TABLE Statement"><code class="literal">REPAIR TABLE</code></a> if the
        table checking operation indicates that there is a corruption or
        that an upgrade is required. For example, to repair a
        <code class="literal">MyISAM</code> table, use this statement:
      </p><pre data-lang="sql" class="programlisting">REPAIR TABLE t1;</pre><p>
        <a class="link" href="programs.html#mysqlcheck" title="4.5.3 mysqlcheck — A Table Maintenance Program"><span class="command"><strong>mysqlcheck --repair</strong></span></a> provides command-line
        access to the <a class="link" href="sql-statements.html#repair-table" title="13.7.3.5 REPAIR TABLE Statement"><code class="literal">REPAIR TABLE</code></a>
        statement. This can be a more convenient means of repairing
        tables because you can use the
        <a class="link" href="programs.html#option_mysqlcheck_databases"><code class="option">--databases</code></a> or
        <a class="link" href="programs.html#option_mysqlcheck_all-databases"><code class="option">--all-databases</code></a> option to
        repair all tables in specific databases or all databases,
        respectively:
      </p><pre data-lang="terminal" class="programlisting">mysqlcheck --repair --databases <em class="replaceable"><code>db_name</code></em> ...
mysqlcheck --repair --all-databases
</pre>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="copying-databases"></a>2.11.14 Copying MySQL Databases to Another Machine</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436253264"></a><a class="indexterm" name="idm46444436251808"></a><a class="indexterm" name="idm46444436250736"></a><p>
      In cases where you need to transfer databases between different
      architectures, you can use <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to create
      a file containing SQL statements. You can then transfer the file
      to the other machine and feed it as input to the
      <a class="link" href="programs.html#mysql" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client.
    </p><p>
      Use <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump --help</strong></span></a> to see what options are
      available.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        If GTIDs are in use on the server where you create the dump
        (<a class="link" href="replication.html#sysvar_gtid_mode"><code class="literal">gtid_mode=ON</code></a>), by default,
        <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> includes the contents of the
        <a class="link" href="replication.html#sysvar_gtid_executed"><code class="literal">gtid_executed</code></a> set in the dump
        to transfer these to the new machine. The results of this can
        vary depending on the MySQL Server versions involved. Check the
        description for <span class="command"><strong>mysqldump's</strong></span>
        <code class="option">--set-gtid-purged</code> option to find what happens
        with the versions you are using, and how to change the behavior
        if the outcome of the default behavior is not suitable for your
        situation.
</p>
</div>
<p>
      The easiest (although not the fastest) way to move a database
      between two machines is to run the following commands on the
      machine on which the database is located:
    </p><pre data-lang="terminal" class="programlisting">mysqladmin -h '<em class="replaceable"><code>other_hostname</code></em>' create <em class="replaceable"><code>db_name</code></em>
mysqldump <em class="replaceable"><code>db_name</code></em> | mysql -h '<em class="replaceable"><code>other_hostname</code></em>' <em class="replaceable"><code>db_name</code></em>
</pre><p>
      If you want to copy a database from a remote machine over a slow
      network, you can use these commands:
    </p><pre data-lang="terminal" class="programlisting">mysqladmin create <em class="replaceable"><code>db_name</code></em>
mysqldump -h '<em class="replaceable"><code>other_hostname</code></em>' --compress <em class="replaceable"><code>db_name</code></em> | mysql <em class="replaceable"><code>db_name</code></em>
</pre><p>
      You can also store the dump in a file, transfer the file to the
      target machine, and then load the file into the database there.
      For example, you can dump a database to a compressed file on the
      source machine like this:
    </p><pre data-lang="terminal" class="programlisting">mysqldump --quick <em class="replaceable"><code>db_name</code></em> | gzip &gt; <em class="replaceable"><code>db_name</code></em>.gz
</pre><p>
      Transfer the file containing the database contents to the target
      machine and run these commands there:
    </p><pre data-lang="terminal" class="programlisting">mysqladmin create <em class="replaceable"><code>db_name</code></em>
gunzip &lt; <em class="replaceable"><code>db_name</code></em>.gz | mysql <em class="replaceable"><code>db_name</code></em>
</pre><a class="indexterm" name="idm46444436225168"></a><a class="indexterm" name="idm46444436224096"></a><p>
      You can also use <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> and
      <a class="link" href="programs.html#mysqlimport" title="4.5.5 mysqlimport — A Data Import Program"><span class="command"><strong>mysqlimport</strong></span></a> to transfer the database. For large
      tables, this is much faster than simply using
      <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>. In the following commands,
      <em class="replaceable"><code>DUMPDIR</code></em> represents the full path name
      of the directory you use to store the output from
      <a class="link" href="programs.html#mysqldump" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>.
    </p><p>
      First, create the directory for the output files and dump the
      database:
    </p><pre data-lang="terminal" class="programlisting">mkdir <em class="replaceable"><code>DUMPDIR</code></em>
mysqldump --tab=<em class="replaceable"><code>DUMPDIR</code></em> <em class="replaceable"><code>db_name</code></em>
</pre><p>
      Then transfer the files in the <em class="replaceable"><code>DUMPDIR</code></em>
      directory to some corresponding directory on the target machine
      and load the files into MySQL there:
    </p><pre data-lang="terminal" class="programlisting">mysqladmin create <em class="replaceable"><code>db_name</code></em>           # create database
cat <em class="replaceable"><code>DUMPDIR</code></em>/*.sql | mysql <em class="replaceable"><code>db_name</code></em>   # create tables in database
mysqlimport <em class="replaceable"><code>db_name</code></em> <em class="replaceable"><code>DUMPDIR</code></em>/*.txt   # load data into tables
</pre><p>
      Do not forget to copy the <code class="literal">mysql</code> database
      because that is where the grant tables are stored. You might have
      to run commands as the MySQL <code class="literal">root</code> user on the
      new machine until you have the <code class="literal">mysql</code> database
      in place.
    </p><p>
      After you import the <code class="literal">mysql</code> database on the new
      machine, execute <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin flush-privileges</strong></span></a> so
      that the server reloads the grant table information.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="downgrading"></a>2.12 Downgrading MySQL</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436203296"></a><p>
    Downgrade from MySQL 8.0 to MySQL 5.7, or
    from a MySQL 8.0 release to a previous MySQL
    8.0 release, is not supported. The only supported
    alternative is to restore a backup taken <span class="emphasis"><em>before</em></span>
    upgrading. It is therefore imperative that you backup your data
    before starting the upgrade process.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="perl-support"></a>2.13 Perl Installation Notes</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="installing.html#perl-installation">2.13.1 Installing Perl on Unix</a></span></dt><dt><span class="section"><a href="installing.html#activestate-perl">2.13.2 Installing ActiveState Perl on Windows</a></span></dt><dt><span class="section"><a href="installing.html#perl-support-problems">2.13.3 Problems Using the Perl DBI/DBD Interface</a></span></dt></dl>
</div>
<a class="indexterm" name="idm46444436199808"></a><a class="indexterm" name="idm46444436198320"></a><p>
    The Perl <code class="literal">DBI</code> module provides a generic interface
    for database access. You can write a <code class="literal">DBI</code> script
    that works with many different database engines without change. To
    use <code class="literal">DBI</code>, you must install the
    <code class="literal">DBI</code> module, as well as a DataBase Driver (DBD)
    module for each type of database server you want to access. For
    MySQL, this driver is the <code class="literal">DBD::mysql</code> module.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      Perl support is not included with MySQL distributions. You can
      obtain the necessary modules from
      <a class="ulink" href="http://search.cpan.org" target="_top">http://search.cpan.org</a> for Unix, or by using the
      ActiveState <span class="command"><strong>ppm</strong></span> program on Windows. The
      following sections describe how to do this.
</p>
</div>
<p>
    The <code class="literal">DBI</code>/<code class="literal">DBD</code> interface requires
    Perl 5.6.0, and 5.6.1 or later is preferred. DBI <span class="emphasis"><em>does not
    work</em></span> if you have an older version of Perl. You should use
    <code class="literal">DBD::mysql</code> 4.009 or higher. Although earlier
    versions are available, they do not support the full functionality
    of MySQL 8.0.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="perl-installation"></a>2.13.1 Installing Perl on Unix</h3>
</div>
</div>
</div>
<p>
      MySQL Perl support requires that you have installed MySQL client
      programming support (libraries and header files). Most
      installation methods install the necessary files. If you install
      MySQL from RPM files on Linux, be sure to install the developer
      RPM as well. The client programs are in the client RPM, but client
      programming support is in the developer RPM.
    </p><p>
      The files you need for Perl support can be obtained from the CPAN
      (Comprehensive Perl Archive Network) at
      <a class="ulink" href="http://search.cpan.org" target="_top">http://search.cpan.org</a>.
    </p><p>
      The easiest way to install Perl modules on Unix is to use the
      <code class="literal">CPAN</code> module. For example:
    </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>perl -MCPAN -e shell</code></strong>
cpan&gt; <strong class="userinput"><code>install DBI</code></strong>
cpan&gt; <strong class="userinput"><code>install DBD::mysql</code></strong>
</pre><p>
      The <code class="literal">DBD::mysql</code> installation runs a number of
      tests. These tests attempt to connect to the local MySQL server
      using the default user name and password. (The default user name
      is your login name on Unix, and <code class="literal">ODBC</code> on
      Windows. The default password is <span class="quote">“<span class="quote">no password.</span>”</span>) If
      you cannot connect to the server with those values (for example,
      if your account has a password), the tests fail. You can use
      <code class="literal">force install DBD::mysql</code> to ignore the failed
      tests.
    </p><p>
      <code class="literal">DBI</code> requires the
      <code class="literal">Data::Dumper</code> module. It may be installed; if
      not, you should install it before installing
      <code class="literal">DBI</code>.
    </p><p>
      It is also possible to download the module distributions in the
      form of compressed <span class="command"><strong>tar</strong></span> archives and build the
      modules manually. For example, to unpack and build a DBI
      distribution, use a procedure such as this:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Unpack the distribution into the current directory:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>gunzip &lt; DBI-<em class="replaceable"><code>VERSION</code></em>.tar.gz | tar xvf -</code></strong>
</pre><p>
          This command creates a directory named
          <code class="filename">DBI-<em class="replaceable"><code>VERSION</code></em></code>.
        </p></li><li class="listitem"><p>
          Change location into the top-level directory of the unpacked
          distribution:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>cd DBI-<em class="replaceable"><code>VERSION</code></em></code></strong>
</pre></li><li class="listitem"><p>
          Build the distribution and compile everything:
        </p><pre data-lang="terminal" class="programlisting">shell&gt; <strong class="userinput"><code>perl Makefile.PL</code></strong>
shell&gt; <strong class="userinput"><code>make</code></strong>
shell&gt; <strong class="userinput"><code>make test</code></strong>
shell&gt; <strong class="userinput"><code>make install</code></strong>
</pre></li></ol>
</div>
<p>
      The <span class="command"><strong>make test</strong></span> command is important because it
      verifies that the module is working. Note that when you run that
      command during the <code class="literal">DBD::mysql</code> installation to
      exercise the interface code, the MySQL server must be running or
      the test fails.
    </p><p>
      It is a good idea to rebuild and reinstall the
      <code class="literal">DBD::mysql</code> distribution whenever you install a
      new release of MySQL. This ensures that the latest versions of the
      MySQL client libraries are installed correctly.
    </p><p>
      If you do not have access rights to install Perl modules in the
      system directory or if you want to install local Perl modules, the
      following reference may be useful:
      <a class="ulink" href="http://learn.perl.org/faq/perlfaq8.html#How-do-I-keep-my-own-module-library-directory-" target="_top">http://learn.perl.org/faq/perlfaq8.html#How-do-I-keep-my-own-module-library-directory-</a>
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="activestate-perl"></a>2.13.2 Installing ActiveState Perl on Windows</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436153904"></a><a class="indexterm" name="idm46444436152448"></a><a class="indexterm" name="idm46444436150960"></a><p>
      On Windows, you should do the following to install the MySQL
      <code class="literal">DBD</code> module with ActiveState Perl:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
          Get ActiveState Perl from
          <a class="ulink" href="http://www.activestate.com/Products/ActivePerl/" target="_top">http://www.activestate.com/Products/ActivePerl/</a>
          and install it.
        </p></li><li class="listitem"><p>
          Open a console window.
        </p></li><li class="listitem"><p>
          If necessary, set the <code class="literal">HTTP_proxy</code> variable.
          For example, you might try a setting like this:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>set HTTP_proxy=my.proxy.com:3128</code></strong>
</pre></li><li class="listitem"><p>
          Start the PPM program:
        </p><pre data-lang="terminal" class="programlisting">C:\&gt; <strong class="userinput"><code>C:\perl\bin\ppm.pl</code></strong>
</pre></li><li class="listitem"><p>
          If you have not previously done so, install
          <code class="literal">DBI</code>:
        </p><pre data-lang="terminal" class="programlisting">ppm&gt; <strong class="userinput"><code>install DBI</code></strong>
</pre></li><li class="listitem"><p>
          If this succeeds, run the following command:
        </p><pre data-lang="terminal" class="programlisting">ppm&gt; <strong class="userinput"><code>install DBD-mysql</code></strong>
</pre></li></ol>
</div>
<p>
      This procedure should work with ActiveState Perl 5.6 or higher.
    </p><p>
      If you cannot get the procedure to work, you should install the
      ODBC driver instead and connect to the MySQL server through ODBC:
    </p><pre data-lang="perl" class="programlisting">use DBI;
$dbh= DBI-&gt;connect("DBI:ODBC:$dsn",$user,$password) ||
die "Got error $DBI::errstr when connecting to $dsn\n";</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="perl-support-problems"></a>2.13.3 Problems Using the Perl DBI/DBD Interface</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm46444436130528"></a><a class="indexterm" name="idm46444436129072"></a><p>
      If Perl reports that it cannot find the
      <code class="filename">../mysql/mysql.so</code> module, the problem is
      probably that Perl cannot locate the
      <code class="filename">libmysqlclient.so</code> shared library. You should
      be able to fix this problem by one of the following methods:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Copy <code class="filename">libmysqlclient.so</code> to the directory
          where your other shared libraries are located (probably
          <code class="filename">/usr/lib</code> or <code class="filename">/lib</code>).
        </p></li><li class="listitem"><p>
          Modify the <code class="option">-L</code> options used to compile
          <code class="literal">DBD::mysql</code> to reflect the actual location
          of <code class="filename">libmysqlclient.so</code>.
        </p></li><li class="listitem"><p>
          On Linux, you can add the path name of the directory where
          <code class="filename">libmysqlclient.so</code> is located to the
          <code class="filename">/etc/ld.so.conf</code> file.
        </p></li><li class="listitem"><p>
          <a class="indexterm" name="idm46444436116672"></a>

          <a class="indexterm" name="idm46444436115584"></a>

          <a class="indexterm" name="idm46444436114096"></a>

          <a class="indexterm" name="idm46444436113008"></a>

          Add the path name of the directory where
          <code class="filename">libmysqlclient.so</code> is located to the
          <code class="literal">LD_RUN_PATH</code> environment variable. Some
          systems use <code class="literal">LD_LIBRARY_PATH</code> instead.
</p></li></ul>
</div>
<p>
      Note that you may also need to modify the <code class="option">-L</code>
      options if there are other libraries that the linker fails to
      find. For example, if the linker cannot find
      <code class="literal">libc</code> because it is in <code class="filename">/lib</code>
      and the link command specifies <code class="option">-L/usr/lib</code>, change
      the <code class="option">-L</code> option to <code class="option">-L/lib</code> or add
      <code class="option">-L/lib</code> to the existing link command.
    </p><p>
      If you get the following errors from
      <code class="literal">DBD::mysql</code>, you are probably using
      <span class="command"><strong>gcc</strong></span> (or using an old binary compiled with
      <span class="command"><strong>gcc</strong></span>):
    </p><pre data-lang="none" class="programlisting">/usr/bin/perl: can't resolve symbol '__moddi3'
/usr/bin/perl: can't resolve symbol '__divdi3'</pre><p>
      Add <code class="option">-L/usr/lib/gcc-lib/... -lgcc</code> to the link
      command when the <code class="filename">mysql.so</code> library gets built
      (check the output from <span class="command"><strong>make</strong></span> for
      <code class="filename">mysql.so</code> when you compile the Perl client).
      The <code class="option">-L</code> option should specify the path name of the
      directory where <code class="filename">libgcc.a</code> is located on your
      system.
    </p><p>
      Another cause of this problem may be that Perl and MySQL are not
      both compiled with <span class="command"><strong>gcc</strong></span>. In this case, you can
      solve the mismatch by compiling both with <span class="command"><strong>gcc</strong></span>.
</p>
</div>

</div>

</div>
<div class="copyright-footer">

</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="introduction.html">Prev</a></td>
<td width="20%" align="center"><a accesskey="u" href="">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="tutorial.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter 1 General Information</td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top">Chapter 3 Tutorial</td>
</tr>
</table>
</div>
</body>
</html>
